Share via


DocumentBase.GetAutomationObject Method

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.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

Syntax

'Declaration
Protected Overridable Function GetAutomationObject As Object
protected virtual Object GetAutomationObject()

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 Combining VBA and Document-Level Customizations.

.NET Framework Security

See Also

Reference

DocumentBase Class

Microsoft.Office.Tools.Word Namespace

Other Resources

Combining VBA and Document-Level Customizations

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