ContentControls 接口

定义

对象的集合 ContentControlA collection of ContentControl objects. 内容控件是文档中绑定的、有可能添加标签的区域,它们充当特定类型的内容的容器。Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. 单个内容控件可能包含诸如日期、列表或格式化文本段落等内容。Individual content controls may contain content such as dates, lists, or paragraphs of formatted text.

public interface class ContentControls : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("804CD967-F83B-432D-9446-C61A45CFEFF0")]
public interface ContentControls : System.Collections.IEnumerable
type ContentControls = interface
    interface IEnumerable
Public Interface ContentControls
Implements IEnumerable
属性
实现

注解

使用 Add(WdContentControlType, Object) 方法创建新的内容控件并将其插入到文档中。Use the Add(WdContentControlType, Object) method to create a new content control and insert it into a document.

使用 Item[Object] 方法可访问集合中的特定内容控件。Use the Item[Object] method to access a specific content control in the collection. 使用该 ContentControl 对象来处理各个内容控件。Use the ContentControl object to work with individual content controls. 有关详细信息,请参阅使用内容控件For more information, see Working with Content Controls

属性

Application

返回一个 _Application 对象,表示 Microsoft Word 应用程序。Returns an _Application object that represents the Microsoft Word application.

Count

返回集合中项的数目 ContentControlsReturns the number of items in the ContentControls collection. 只读。Read-only.

Creator

返回一个 32 位整数,它指示在其中创建外接程序的应用程序。Returns a 32-bit integer that indicates the application in which the add-in was created. 只读。Read-only.

Item[Object]

返回文档中内容控件集合内的指定内容控件。Returns the specified content control within the collection of content controls in a document.

Parent

返回对象的父对象 ContentControlsReturns the parent object of the ContentControls object.

方法

Add(WdContentControlType, Object)

将指定类型的新内容控件添加到活动文档中,并返回 ContentControl 表示新内容控件的对象。Adds a new content control, of the type specified, into the active document and returns a ContentControl object that represents the new content control.

GetEnumerator()

适用于