Word.Interfaces.ContentControlLoadOptions interface
表示内容控件。 内容控件是文档中绑定的、有可能添加标签的区域,它们充当特定类型的内容的容器。 各个内容控件可能包含诸如图像、表格或格式化文本段落等内容。 目前仅支持格式文本、纯文本、复选框、下拉列表和组合框内容控件。
属性
| $all | 指定加载选项将 |
| appearance | 指定内容控件的外观。 值可以是 |
| building |
如果内容控件为 Word,则获取与构建基块库相关的数据。ContentControlType is |
| cannot |
指定用户是否可以删除内容控件。 与 |
| cannot |
指定用户是否可以编辑内容控件的内容。 |
| checkbox |
获取内容控件的数据(当其类型为 |
| color | 指定内容控件的颜色。 颜色以“#RRGGBB”格式或使用颜色名称指定。 |
| date |
如果内容控件为 Word,则获取日期选取器相关数据。ContentControlType is |
| font | 获取内容控件的文本格式。 使用此对象获取和设置字体名称、大小、颜色和其他属性。 |
| group |
如果内容控件为 Word,则获取与组相关的数据。ContentControlType is |
| id | 获取表示内容控件标识符的整数。 |
| parent |
获取 contentControl 的父正文。 |
| parent |
获取包含此内容控件的内容控件。 如果没有父内容控件,则引发 |
| parent |
获取包含此内容控件的内容控件。 如果没有父内容控件,则此方法将返回其 |
| parent |
获取包含 contentControl 的 table。 如果表中未包含,则引发 |
| parent |
获取包含 contentControl 的 tableCell。 如果表单元格中未包含错误,则引发 |
| parent |
获取包含 contentControl 的 tableCell。 如果它未包含在表单元格中,则此方法将返回其 |
| parent |
获取包含 contentControl 的 table。 如果它未包含在表中,则此方法将返回其 |
| picture |
如果是内容控件的 Word,则获取与图片相关的数据。ContentControlType is |
| placeholder |
指定内容控件的占位符文本。 内容控件为空时,将显示灰色的文本。 |
| remove |
指定是否在编辑内容控件后将其删除。 与 |
| repeating |
如果是内容控件的 Word,则获取与重复节相关的数据。ContentControlType is |
| style | 指定内容控件的样式名称。 请对自定义样式和本地化样式名称使用此属性。 若要使用可在区域设置之间移植的内置样式,请参阅 |
| style |
指定内容控件的内置样式名称。 请对可以在区域设置之间移植的嵌入样式使用此属性。 要使用自定义样式或本地化样式名称,请参阅 |
| subtype | 获取 contentControl 的子类型。 子类型可以是 |
| tag | 指定用于标识内容控件的标记。 |
| text | 获取内容控件的文本。 |
| title | 指定内容控件的标题。 |
| type | 获取内容控件的类型。 目前仅支持富文本、纯文本、检查框、下拉列表、组合框、构建基块库、日期选取器、重复节、图片和组内容控件。 |
| xml |
返回一个 |
属性详细信息
$all
指定加载选项将 $all 加载所有标量属性 ((如 Range.address) ),但不会加载导航属性 ((如 Range.format.fill.color) )。
$all?: boolean;
属性值
boolean
appearance
buildingBlockGalleryContentControl
如果内容控件为 Word,则获取与构建基块库相关的数据。ContentControlType is buildingBlockGallery. 情况并非 null 如此。
buildingBlockGalleryContentControl?: Word.Interfaces.BuildingBlockGalleryContentControlLoadOptions;
属性值
注解
cannotDelete
cannotEdit
checkboxContentControl
获取内容控件的数据(当其类型为 checkBox时)。 情况并非 null 如此。
checkboxContentControl?: Word.Interfaces.CheckboxContentControlLoadOptions;
属性值
注解
color
datePickerContentControl
如果内容控件为 Word,则获取日期选取器相关数据。ContentControlType is datePicker. 情况并非 null 如此。
datePickerContentControl?: Word.Interfaces.DatePickerContentControlLoadOptions;
属性值
注解
font
获取内容控件的文本格式。 使用此对象获取和设置字体名称、大小、颜色和其他属性。
font?: Word.Interfaces.FontLoadOptions;
属性值
注解
groupContentControl
如果内容控件为 Word,则获取与组相关的数据。ContentControlType is group. 情况并非 null 如此。
groupContentControl?: Word.Interfaces.GroupContentControlLoadOptions;
属性值
注解
id
parentBody
获取 contentControl 的父正文。
parentBody?: Word.Interfaces.BodyLoadOptions;
属性值
注解
parentContentControl
获取包含此内容控件的内容控件。 如果没有父内容控件,则引发 ItemNotFound 错误。
parentContentControl?: Word.Interfaces.ContentControlLoadOptions;
属性值
注解
parentContentControlOrNullObject
获取包含此内容控件的内容控件。 如果没有父内容控件,则此方法将返回其 isNullObject 属性设置为 true的对象。 有关详细信息,请参阅 *OrNullObject 方法和属性。
parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;
属性值
注解
parentTable
获取包含 contentControl 的 table。 如果表中未包含,则引发 ItemNotFound 错误。
parentTable?: Word.Interfaces.TableLoadOptions;
属性值
注解
parentTableCell
获取包含 contentControl 的 tableCell。 如果表单元格中未包含错误,则引发 ItemNotFound 错误。
parentTableCell?: Word.Interfaces.TableCellLoadOptions;
属性值
注解
parentTableCellOrNullObject
获取包含 contentControl 的 tableCell。 如果它未包含在表单元格中,则此方法将返回其 isNullObject 属性设置为 true的对象。 有关详细信息,请参阅 *OrNullObject 方法和属性。
parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions;
属性值
注解
parentTableOrNullObject
获取包含 contentControl 的 table。 如果它未包含在表中,则此方法将返回其 isNullObject 属性设置为 true的对象。 有关详细信息,请参阅 *OrNullObject 方法和属性。
parentTableOrNullObject?: Word.Interfaces.TableLoadOptions;
属性值
注解
pictureContentControl
如果是内容控件的 Word,则获取与图片相关的数据。ContentControlType is picture. 情况并非 null 如此。
pictureContentControl?: Word.Interfaces.PictureContentControlLoadOptions;
属性值
注解
placeholderText
removeWhenEdited
repeatingSectionContentControl
如果是内容控件的 Word,则获取与重复节相关的数据。ContentControlType is repeatingSection. 情况并非 null 如此。
repeatingSectionContentControl?: Word.Interfaces.RepeatingSectionContentControlLoadOptions;
属性值
注解
style
指定内容控件的样式名称。 请对自定义样式和本地化样式名称使用此属性。 若要使用可在区域设置之间移植的内置样式,请参阅 styleBuiltIn 属性。
style?: boolean;
属性值
boolean
注解
styleBuiltIn
指定内容控件的内置样式名称。 请对可以在区域设置之间移植的嵌入样式使用此属性。 要使用自定义样式或本地化样式名称,请参阅 style 属性。
styleBuiltIn?: boolean;
属性值
boolean
注解
subtype
获取 contentControl 的子类型。 子类型可以是 richTextInline、 richTextParagraphs、richTextTableCell , richTextTableRowrichTextTable以及格式文本内容控件,plainTextParagraphplainTextInline对于纯文本内容控件,checkBox对于复选框内容控件,dropDownList对于下拉列表内容控件,comboBox对于组合框内容控件,对于构建基块库内容控件datePicker,buildingBlockGallery对于日期选取器内容控件,repeatingSection对于重复节内容控件,picture对于图片内容控件group,对于组内容控件。
subtype?: boolean;
属性值
boolean
注解
tag
text
title
type
获取内容控件的类型。 目前仅支持富文本、纯文本、检查框、下拉列表、组合框、构建基块库、日期选取器、重复节、图片和组内容控件。
type?: boolean;
属性值
boolean
注解
xmlMapping
返回一个 XmlMapping 对象,该对象表示内容控件到文档数据存储中 XML 数据的映射。
xmlMapping?: Word.Interfaces.XmlMappingLoadOptions;