Factory.GetVstoObject Method (_Workbook)
Returns a Microsoft.Office.Tools.Excel.Workbook host item that extends the functionality of the specified native workbook object.
Namespace: Microsoft.Office.Tools.Excel
Assemblies: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)
Syntax
'Declaration
Function GetVstoObject ( _
workbook As _Workbook _
) As Workbook
Workbook GetVstoObject(
_Workbook workbook
)
Parameters
workbook
Type: _WorkbookThe native workbook object for which to retrieve the extended object. Although this parameter is of type _Workbook, you typically pass a Workbook object to this method.
Return Value
Type: Microsoft.Office.Tools.Excel.Workbook
The host item that extends the functionality of the native workbook object, if the native workbook is the underlying object of a Microsoft.Office.Tools.Excel.Workbook object in the current document-level customization; otherwise, nulla null reference (Nothing in Visual Basic).
Remarks
In a document-level customization, you cannot use this method to generate a new extended Microsoft.Office.Tools.Excel.Workbook object for a native workbook object. You can use this method only to get a Microsoft.Office.Tools.Excel.Workbook object that is in the current customization. For more information, see Programming Document-Level Customizations.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.