Edit

Share via


Word.Interfaces.ContentControlCollectionLoadOptions interface

Contains a collection of Word.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 contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, checkbox, dropdown list, and combo box content controls are supported.

Remarks

[ API set: WordApi 1.1 ]

Properties

$all

Specifying $all for the load options loads all the scalar properties (such as Range.address) but not the navigational properties (such as Range.format.fill.color).

appearance

For EACH ITEM in the collection: Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'.

buildingBlockGalleryContentControl

For EACH ITEM in the collection: Gets the building block gallery-related data if the content control's Word.ContentControlType is BuildingBlockGallery. It's null otherwise.

cannotDelete

For EACH ITEM in the collection: Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited.

cannotEdit

For EACH ITEM in the collection: Specifies a value that indicates whether the user can edit the contents of the content control.

checkboxContentControl

For EACH ITEM in the collection: Gets the data of the content control when its type is CheckBox. It's null otherwise.

color

For EACH ITEM in the collection: Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name.

datePickerContentControl

For EACH ITEM in the collection: Gets the date picker-related data if the content control's Word.ContentControlType is DatePicker. It's null otherwise.

font

For EACH ITEM in the collection: Gets the text format of the content control. Use this to get and set font name, size, color, and other properties.

groupContentControl

For EACH ITEM in the collection: Gets the group-related data if the content control's Word.ContentControlType is Group. It's null otherwise.

id

For EACH ITEM in the collection: Gets an integer that represents the content control identifier.

parentBody

For EACH ITEM in the collection: Gets the parent body of the content control.

parentContentControl

For EACH ITEM in the collection: Gets the content control that contains the content control. Throws an ItemNotFound error if there isn't a parent content control.

parentContentControlOrNullObject

For EACH ITEM in the collection: Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentTable

For EACH ITEM in the collection: Gets the table that contains the content control. Throws an ItemNotFound error if it isn't contained in a table.

parentTableCell

For EACH ITEM in the collection: Gets the table cell that contains the content control. Throws an ItemNotFound error if it isn't contained in a table cell.

parentTableCellOrNullObject

For EACH ITEM in the collection: Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentTableOrNullObject

For EACH ITEM in the collection: Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

pictureContentControl

For EACH ITEM in the collection: Gets the picture-related data if the content control's Word.ContentControlType is Picture. It's null otherwise.

placeholderText

For EACH ITEM in the collection: Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty.

removeWhenEdited

For EACH ITEM in the collection: Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete.

repeatingSectionContentControl

For EACH ITEM in the collection: Gets the repeating section-related data if the content control's Word.ContentControlType is RepeatingSection. It's null otherwise.

style

For EACH ITEM in the collection: Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property.

styleBuiltIn

For EACH ITEM in the collection: Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property.

subtype

For EACH ITEM in the collection: Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls.

tag

For EACH ITEM in the collection: Specifies a tag to identify a content control.

text

For EACH ITEM in the collection: Gets the text of the content control.

title

For EACH ITEM in the collection: Specifies the title for a content control.

type

For EACH ITEM in the collection: Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently.

xmlMapping

For EACH ITEM in the collection: Returns an XmlMapping object that represents the mapping of the content control to XML data in the data store of the document.

Property Details

$all

Specifying $all for the load options loads all the scalar properties (such as Range.address) but not the navigational properties (such as Range.format.fill.color).

$all?: boolean;

Property Value

boolean

appearance

For EACH ITEM in the collection: Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'.

appearance?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

buildingBlockGalleryContentControl

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

For EACH ITEM in the collection: Gets the building block gallery-related data if the content control's Word.ContentControlType is BuildingBlockGallery. It's null otherwise.

buildingBlockGalleryContentControl?: Word.Interfaces.BuildingBlockGalleryContentControlLoadOptions;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

cannotDelete

For EACH ITEM in the collection: Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited.

cannotDelete?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

cannotEdit

For EACH ITEM in the collection: Specifies a value that indicates whether the user can edit the contents of the content control.

cannotEdit?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

checkboxContentControl

For EACH ITEM in the collection: Gets the data of the content control when its type is CheckBox. It's null otherwise.

checkboxContentControl?: Word.Interfaces.CheckboxContentControlLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.7 ]

color

For EACH ITEM in the collection: Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name.

color?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

datePickerContentControl

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

For EACH ITEM in the collection: Gets the date picker-related data if the content control's Word.ContentControlType is DatePicker. It's null otherwise.

datePickerContentControl?: Word.Interfaces.DatePickerContentControlLoadOptions;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

font

For EACH ITEM in the collection: Gets the text format of the content control. Use this to get and set font name, size, color, and other properties.

font?: Word.Interfaces.FontLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.1 ]

groupContentControl

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

For EACH ITEM in the collection: Gets the group-related data if the content control's Word.ContentControlType is Group. It's null otherwise.

groupContentControl?: Word.Interfaces.GroupContentControlLoadOptions;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

id

For EACH ITEM in the collection: Gets an integer that represents the content control identifier.

id?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

parentBody

For EACH ITEM in the collection: Gets the parent body of the content control.

parentBody?: Word.Interfaces.BodyLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

parentContentControl

For EACH ITEM in the collection: Gets the content control that contains the content control. Throws an ItemNotFound error if there isn't a parent content control.

parentContentControl?: Word.Interfaces.ContentControlLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.1 ]

parentContentControlOrNullObject

For EACH ITEM in the collection: Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

parentTable

For EACH ITEM in the collection: Gets the table that contains the content control. Throws an ItemNotFound error if it isn't contained in a table.

parentTable?: Word.Interfaces.TableLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

parentTableCell

For EACH ITEM in the collection: Gets the table cell that contains the content control. Throws an ItemNotFound error if it isn't contained in a table cell.

parentTableCell?: Word.Interfaces.TableCellLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

parentTableCellOrNullObject

For EACH ITEM in the collection: Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

parentTableOrNullObject

For EACH ITEM in the collection: Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentTableOrNullObject?: Word.Interfaces.TableLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

pictureContentControl

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

For EACH ITEM in the collection: Gets the picture-related data if the content control's Word.ContentControlType is Picture. It's null otherwise.

pictureContentControl?: Word.Interfaces.PictureContentControlLoadOptions;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

placeholderText

For EACH ITEM in the collection: Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty.

placeholderText?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

removeWhenEdited

For EACH ITEM in the collection: Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete.

removeWhenEdited?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

repeatingSectionContentControl

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

For EACH ITEM in the collection: Gets the repeating section-related data if the content control's Word.ContentControlType is RepeatingSection. It's null otherwise.

repeatingSectionContentControl?: Word.Interfaces.RepeatingSectionContentControlLoadOptions;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

style

For EACH ITEM in the collection: Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property.

style?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

styleBuiltIn

For EACH ITEM in the collection: Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property.

styleBuiltIn?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.3 ]

subtype

For EACH ITEM in the collection: Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls.

subtype?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.3 ]

tag

For EACH ITEM in the collection: Specifies a tag to identify a content control.

tag?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

text

For EACH ITEM in the collection: Gets the text of the content control.

text?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

title

For EACH ITEM in the collection: Specifies the title for a content control.

title?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

type

For EACH ITEM in the collection: Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently.

type?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

xmlMapping

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

For EACH ITEM in the collection: Returns an XmlMapping object that represents the mapping of the content control to XML data in the data store of the document.

xmlMapping?: Word.Interfaces.XmlMappingLoadOptions;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]