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 and plain text 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'.

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.

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.

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.

id

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

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.

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.

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.

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.

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 ]

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 ]

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 ]

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 ]

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 ]

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 ]

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 ]

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 ]

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 ]