Microsoft.Office.Tools.Word 命名空间

Microsoft.Office.Tools.Word 命名空间包含一些类型,用于扩展和支持使用 Visual Studio 中 Office 开发工具创建的项目中的 Microsoft Office Word 对象模型。 有关这些项目的更多信息,请参见 Office 项目模板概述

Microsoft.Office.Tools.Word 命名空间包括以下主要类型:

  说明
公共类 ControlExtensions 提供一些扩展方法,可以使用这些方法向已使用 Visual Studio 中的 Office 开发工具自定义的 Word 文档中添加 Windows 窗体控件。
公共类 DocumentBase 提供 Microsoft Office Word 的文档级项目中的 ThisDocument 类的基类。

接口

  接口 说明
公共接口 Action 表示使用 Visual Studio 中的 Office 开发工具自定义的 Word 文档中的智能标记操作。
公共接口 ActionEventArgs ClickBeforeCaptionShow 事件提供数据。 此类型或成员只适合在 2007 Microsoft Office system 项目中使用。Office 2010 中已弃用智能标记。
公共接口 ApplicationFactory 提供可用于在应用程序级外接程序中执行杂项任务(如扩展本机 Word 文档以及在运行时创建功能区控件)的方法。
公共接口 Bookmark Bookmark 控件是一个具有唯一名称且用于公开事件的书签,可以绑定到数据。
公共接口 Bookmark_InformationType 基础结构。
公共接口 Bookmark_XMLType 基础结构。
公共接口 BuildingBlockGalleryContentControl 表示用户可插入文档的文档构造块库。
公共接口 ClickEventArgs BeforeDoubleClickBeforeRightClick 事件提供数据。
公共接口 ComboBoxContentControl 表示文档中的组合框。
公共接口 ContentControl 表示文档中的内容控件。
公共接口 ContentControlAddedEventArgs 提供内容控件的 Added 事件的数据。
公共接口 ContentControlBase 提供 Word 解决方案中的内容控件的基接口,这些解决方案是使用 Visual Studio 中的 Office 开发工具创建的。
公共接口 ContentControlContentUpdatingEventArgs 提供内容控件的 ContentUpdating 事件的数据。
公共接口 ContentControlDeletingEventArgs 提供内容控件的 Deleting 事件的数据。
公共接口 ContentControlEnteringEventArgs Entering 事件提供数据。
公共接口 ContentControlExitingEventArgs 提供内容控件的 Exiting 事件的数据。
公共接口 ContentControlStoreUpdatingEventArgs 提供内容控件的 StoreUpdating 事件的数据。
公共接口 ContextChangeEventArgs XMLNode 对象的 SelectDeselectContextEnterContextLeave 事件以及 XMLNodes 对象的 ContextEnterContextLeaveSelectDeselect 事件提供数据。
公共接口 ControlCollection 表示 Word 文档中的托管控件的集合,该文档是使用 Visual Studio 中的 Office 开发工具自定义的。
公共接口 ControlSite 表示文档上链接或嵌入的控件。
公共接口 DatePickerContentControl 表示文档中的日期选择器控件。
公共接口 Document 表示使用 Visual Studio 中的 Office 开发工具创建的 Word 项目中的文档。
公共接口 Document_ActiveWritingStyleType 基础结构。
公共接口 Document_CompatibilityType 基础结构。
公共接口 DropDownListContentControl 表示文档中的下拉列表。
公共接口 Factory 提供可用于在文档级自定义项中执行杂项任务(如在运行时创建功能区控件以及向文档添加智能标记)的方法。
公共接口 GroupContentControl 表示用户无法编辑或删除的受保护文档区域。
公共接口 IDocumentExtension 表示 Document 对象的一个扩展。
公共接口 ISmartTagExtension 表示使用 Visual Studio 中的 Office 开发工具自定义的 Word 文档中的智能标记扩展。该扩展为智能标记定义自定义识别器。
公共接口 MailMergeAfterMergeEventArgs MailMergeAfterMerge 事件提供数据。
公共接口 MailMergeWizardStateChangeEventArgs MailMergeWizardStateChange 事件提供数据。
公共接口 NodeInsertAndDeleteEventArgs XMLNode 控件的 AfterInsertBeforeDelete 事件以及 XMLNodes 控件的 AfterInsertBeforeDelete 事件提供数据。
公共接口 PictureContentControl 表示显示图像的文档区域。
公共接口 PlainTextContentControl 表示文档中的文本块。
公共接口 RichTextContentControl 表示文档中的文本块或其他类型的内容。
公共接口 SaveEventArgs BeforeSave 事件提供数据。
公共接口 SelectionEventArgs Bookmark 控件的 SelectionChangeSelectedDeselected 事件提供数据。
公共接口 SmartTag 表示使用 Visual Studio 中的 Office 开发工具自定义的 Word 文档中的智能标记。
公共接口 SmartTagRecognizeContext 提供调用自定义智能标记识别器的上下文。
公共接口 WindowEventArgs ActivateEventDeactivateWindowSize 事件提供信息。
公共接口 XMLNode 表示在文档上公开事件并且可以绑定到数据的单个 XML 节点。
公共接口 XMLNode_ValidationErrorTextType 基础结构。
公共接口 XMLNode_XMLType 基础结构。
公共接口 XMLNodes 表示“XML 结构”任务窗格树视图中的节点的 Microsoft.Office.Interop.Word.XMLNode 对象的集合,它指示用户已应用于文档的元素。

委托

  委托 说明
公共委托 ActionClickEventHandler 表示将要处理 ActionClick 事件的方法。
公共委托 BeforeCaptionShowEventHandler 表示将要处理 ActionBeforeCaptionShow 事件的方法。 此类型或成员只适合在 2007 Microsoft Office system 项目中使用。Office 2010 中已弃用智能标记。
公共委托 ClickEventHandler 表示将处理 DocumentBeforeDoubleClickBeforeRightClick 事件的方法。
公共委托 ContentControlAddedEventHandler 表示将要处理 ContentControlBaseAdded 事件的方法。
公共委托 ContentControlContentUpdatingEventHandler 表示将要处理 ContentControlBaseContentUpdating 事件的方法。
公共委托 ContentControlDeletingEventHandler 表示将要处理 ContentControlBaseDeleting 事件的方法。
公共委托 ContentControlEnteringEventHandler 表示将要处理 ContentControlBaseEntering 事件的方法。
公共委托 ContentControlExitingEventHandler 表示将要处理 ContentControlBaseExiting 事件的方法。
公共委托 ContentControlStoreUpdatingEventHandler 表示将要处理 ContentControlBaseStoreUpdating 事件的方法。
公共委托 ContextChangeEventHandler 表示将处理 XMLNode 对象的 SelectDeselectContextEnterContextLeave 事件以及 XMLNodes 对象的 ContextEnterContextLeaveSelectDeselect 事件的方法。
公共委托 MailMergeAfterMergeEventHandler 表示处理 DocumentMailMergeAfterMerge 事件的方法。
公共委托 MailMergeWizardStateChangeEventHandler 表示处理 DocumentMailMergeWizardStateChange 事件的方法。
公共委托 NodeInsertAndDeleteEventHandler 表示处理 XMLNode 控件的 AfterInsertBeforeDelete 事件,以及 XMLNodes 控件的 AfterInsertBeforeDelete 事件的方法。
公共委托 SaveEventHandler 表示将要处理 DocumentBeforeSave 事件的方法。
公共委托 SelectionEventHandler 表示处理 Bookmark 控件的 SelectionChangeSelectedDeselected 事件的方法。
公共委托 WindowEventHandler 表示将处理 ActivateEventDeactivateWindowSize 事件的方法。

请参见

参考

其他资源

宿主项和宿主控件概述

文档宿主项

Word Host Controls

内容控件

宿主项和宿主控件的编程限制

Word Document-Level Customization Development

Office 解决方案开发概述