Share via


Document.GetAutomationObject Method (2007 System)

Called by the Visual Studio Tools for Office runtime to get an object that can be used by VBA code in the document.

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

Syntax

'Declaration
Protected Overridable Function GetAutomationObject As Object
'Usage
Dim returnValue As Object 

returnValue = Me.GetAutomationObject()
protected virtual Object GetAutomationObject()
protected:
virtual Object^ GetAutomationObject()
protected function GetAutomationObject() : Object

Return Value

Type: System.Object
An object in a document-level customization that can be used by VBA code in the document.

Remarks

Override this method to return an instance of a class that you have exposed to VBA code in the document. For more information, see Calling Code in Document-Level Customizations from VBA.

.NET Framework Security

See Also

Reference

Document Class

Document Members

Microsoft.Office.Tools.Word Namespace

Other Resources

Calling Code in Document-Level Customizations from VBA

How to: Expose Code to VBA in a Visual Basic Project

How to: Expose Code to VBA in a Visual C# Project

Walkthrough: Calling Code from VBA in a Visual Basic Project

Walkthrough: Calling Code from VBA in a Visual C# Project