Dela via


RibbonReadOnlyCollection.GetRibbon<TRibbon> Method (2007 System)

This API supports the Visual Studio Tools for Office infrastructure and is not intended to be used directly from your code.

Returns an instance of an OfficeRibbon of the specified type, if it exists in this RibbonReadOnlyCollection.

Namespace:  Microsoft.Office.Tools.Ribbon
Assembly:  Microsoft.Office.Tools.Common.v9.0 (in Microsoft.Office.Tools.Common.v9.0.dll)

Syntax

'Declaration
Protected Function GetRibbon(Of TRibbon As OfficeRibbon) As TRibbon
'Usage
Dim returnValue As TRibbon

returnValue = Me.GetRibbon()
protected TRibbon GetRibbon<TRibbon>()
where TRibbon : OfficeRibbon
protected:
generic<typename TRibbon>
where TRibbon : OfficeRibbon
TRibbon GetRibbon()
JScript does not support generic types or methods.

Type Parameters

  • TRibbon

Return Value

Type: TRibbon
An instance of an OfficeRibbon of the specified type if it exists in this RibbonReadOnlyCollection. nulla null reference (Nothing in Visual Basic) if no OfficeRibbon objects of the specified type exist in this RibbonReadOnlyCollection.

.NET Framework Security

See Also

Reference

RibbonReadOnlyCollection Class

RibbonReadOnlyCollection Members

Microsoft.Office.Tools.Ribbon Namespace