Compartilhar via


Factory.GetVstoObject(_Document) Method

Definition

Returns a Document host item that extends the functionality of the specified native document object.

public:
 Microsoft::Office::Tools::Word::Document ^ GetVstoObject(Microsoft::Office::Interop::Word::_Document ^ document);
public Microsoft.Office.Tools.Word.Document GetVstoObject (Microsoft.Office.Interop.Word._Document document);
abstract member GetVstoObject : Microsoft.Office.Interop.Word._Document -> Microsoft.Office.Tools.Word.Document
Public Function GetVstoObject (document As _Document) As Document

Parameters

document
_Document

The native document object for which to retrieve the extended object. Although this parameter is of type _Document, you typically pass a Document object to this method.

Returns

The host item that extends the functionality of the native document object, if the native document is the underlying object of a Document object in the current document-level customization; otherwise, null.

Remarks

In a document-level customization, you cannot use this method to generate a new extended Microsoft.Office.Tools.Word.Document object for a native document object. You can use this method only to get a Microsoft.Office.Tools.Word.Document object that is in the current customization. For more information, see Programming Document-Level Customizations.

Applies to