共用方式為


Document.Extension Property

Gets a custom extension for this Document object.

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

Syntax

'Declaration
ReadOnly Property Extension As IDocumentExtension
IDocumentExtension Extension { get; }

Property Value

Type: Microsoft.Office.Tools.Word.IDocumentExtension
A custom extension for this Document object.

Remarks

A custom extension is an implementation of the IDocumentExtension interface in a Word solution that is created by using the Office development tools in Visual Studio. In document-level projects, this property returns an instance of the generated ThisDocument class by default. The ThisDocument class implements the IDocumentExtension interface through the DocumentBase class. For more information, see Programming Document-Level Customizations.

.NET Framework Security

See Also

Reference

Document Interface

Microsoft.Office.Tools.Word Namespace