更新:2007 年 11 月
表示 Microsoft Office Word 的 Visual Studio Tools for Office 项目中的一个文档。
命名空间:  Microsoft.Office.Tools.Word
程序集:  Microsoft.Office.Tools.Word.v9.0(在 Microsoft.Office.Tools.Word.v9.0.dll 中)
语法
声明
<PermissionSetAttribute(SecurityAction.Demand, Name := "FullTrust")> _
Public Class Document _
    Inherits EntryPointBindableComponentBase _
    Implements IActivatable, IServiceProviderCallback, IOfficeHostItemEntryPoint, IEntryPoint,  _
    ISupportInitializeControl, ISupportInitialize
用法
Dim instance As Document
[PermissionSetAttribute(SecurityAction.Demand, Name = "FullTrust")]
public class Document : EntryPointBindableComponentBase, IActivatable, 
    IServiceProviderCallback, IOfficeHostItemEntryPoint, IEntryPoint, ISupportInitializeControl, ISupportInitialize
备注
Microsoft.Office.Tools.Word.Document 类是 Visual Studio Tools for Office 项目中的 Word 文档的宿主项。Microsoft.Office.Tools.Word.Document 类与 Word 主互操作程序集中的 Microsoft.Office.Interop.Word.Document 类可提供相同的成员,但前者还会添加下列功能:
- Controls 属性。使用此属性可在运行时在 Word 文档中添加控件或者移除控件。 
- VstoSmartTags 属性。使用此属性可在文档中添加智能标记。 
- 仅在 Word 对象模型的应用程序级别提供的文档级事件,例如 BeforeClose 和 BeforeSave。换句话说,在 Word 对象模型中,这些事件在 Microsoft.Office.Interop.Word.Application 类中定义。 
有关更多信息,请参见宿主项和宿主控件概述和文档宿主项。
继承层次结构
System.Object
  Microsoft.VisualStudio.Tools.Office.RemoteComponent
    Microsoft.VisualStudio.Tools.Office.EntryPointComponentBase
      Microsoft.VisualStudio.Tools.Office.EntryPointBindableComponentBase
        Microsoft.Office.Tools.Word.Document
线程安全
此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。
另请参见
参考
Microsoft.Office.Tools.Word 命名空间