Word.Interfaces.ContentControlLoadOptions interface

Represents a content control. 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 content controls are supported.

[ API set: WordApi 1.1 ]

Properties

$all
appearance

Gets or sets the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'.

[ API set: WordApi 1.1 ]

cannotDelete

Gets or sets a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited.

[ API set: WordApi 1.1 ]

cannotEdit

Gets or sets a value that indicates whether the user can edit the contents of the content control.

[ API set: WordApi 1.1 ]

color

Gets or sets the color of the content control. Color is specified in '#RRGGBB' format or by using the color name.

[ API set: WordApi 1.1 ]

font

Gets the text format of the content control. Use this to get and set font name, size, color, and other properties.

[ API set: WordApi 1.1 ]

id

Gets an integer that represents the content control identifier. Read-only.

[ API set: WordApi 1.1 ]

parentBody

Gets the parent body of the content control.

[ API set: WordApi 1.3 ]

parentContentControl

Gets the content control that contains the content control. Throws an error if there isn't a parent content control.

[ API set: WordApi 1.1 ]

parentContentControlOrNullObject

Gets the content control that contains the content control. Returns a null object if there isn't a parent content control.

[ API set: WordApi 1.3 ]

parentTable

Gets the table that contains the content control. Throws an error if it is not contained in a table.

[ API set: WordApi 1.3 ]

parentTableCell

Gets the table cell that contains the content control. Throws an error if it is not contained in a table cell.

[ API set: WordApi 1.3 ]

parentTableCellOrNullObject

Gets the table cell that contains the content control. Returns a null object if it is not contained in a table cell.

[ API set: WordApi 1.3 ]

parentTableOrNullObject

Gets the table that contains the content control. Returns a null object if it is not contained in a table.

[ API set: WordApi 1.3 ]

placeholderText

Gets or sets the placeholder text of the content control. Dimmed text will be displayed when the content control is empty.

[ API set: WordApi 1.1 ]

removeWhenEdited

Gets or sets a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete.

[ API set: WordApi 1.1 ]

style

Gets or sets 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.

[ API set: WordApi 1.1 ]

styleBuiltIn

Gets or sets 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.

[ API set: WordApi 1.3 ]

subtype

Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls. Read-only.

[ API set: WordApi 1.3 ]

tag

Gets or sets a tag to identify a content control.

[ API set: WordApi 1.1 ]

text

Gets the text of the content control. Read-only.

[ API set: WordApi 1.1 ]

title

Gets or sets the title for a content control.

[ API set: WordApi 1.1 ]

type

Gets the content control type. Only rich text content controls are supported currently. Read-only.

[ API set: WordApi 1.1 ]

Property Details

$all

$all?: boolean;

Property Value

boolean

appearance

Gets or sets the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'.

[ API set: WordApi 1.1 ]

appearance?: boolean;

Property Value

boolean

cannotDelete

Gets or sets a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited.

[ API set: WordApi 1.1 ]

cannotDelete?: boolean;

Property Value

boolean

cannotEdit

Gets or sets a value that indicates whether the user can edit the contents of the content control.

[ API set: WordApi 1.1 ]

cannotEdit?: boolean;

Property Value

boolean

color

Gets or sets the color of the content control. Color is specified in '#RRGGBB' format or by using the color name.

[ API set: WordApi 1.1 ]

color?: boolean;

Property Value

boolean

font

Gets the text format of the content control. Use this to get and set font name, size, color, and other properties.

[ API set: WordApi 1.1 ]

font?: Word.Interfaces.FontLoadOptions;

Property Value

id

Gets an integer that represents the content control identifier. Read-only.

[ API set: WordApi 1.1 ]

id?: boolean;

Property Value

boolean

parentBody

Gets the parent body of the content control.

[ API set: WordApi 1.3 ]

parentBody?: Word.Interfaces.BodyLoadOptions;

Property Value

parentContentControl

Gets the content control that contains the content control. Throws an error if there isn't a parent content control.

[ API set: WordApi 1.1 ]

parentContentControl?: Word.Interfaces.ContentControlLoadOptions;

Property Value

parentContentControlOrNullObject

Gets the content control that contains the content control. Returns a null object if there isn't a parent content control.

[ API set: WordApi 1.3 ]

parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;

Property Value

parentTable

Gets the table that contains the content control. Throws an error if it is not contained in a table.

[ API set: WordApi 1.3 ]

parentTable?: Word.Interfaces.TableLoadOptions;

Property Value

parentTableCell

Gets the table cell that contains the content control. Throws an error if it is not contained in a table cell.

[ API set: WordApi 1.3 ]

parentTableCell?: Word.Interfaces.TableCellLoadOptions;

Property Value

parentTableCellOrNullObject

Gets the table cell that contains the content control. Returns a null object if it is not contained in a table cell.

[ API set: WordApi 1.3 ]

parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions;

Property Value

parentTableOrNullObject

Gets the table that contains the content control. Returns a null object if it is not contained in a table.

[ API set: WordApi 1.3 ]

parentTableOrNullObject?: Word.Interfaces.TableLoadOptions;

Property Value

placeholderText

Gets or sets the placeholder text of the content control. Dimmed text will be displayed when the content control is empty.

[ API set: WordApi 1.1 ]

placeholderText?: boolean;

Property Value

boolean

removeWhenEdited

Gets or sets a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete.

[ API set: WordApi 1.1 ]

removeWhenEdited?: boolean;

Property Value

boolean

style

Gets or sets 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.

[ API set: WordApi 1.1 ]

style?: boolean;

Property Value

boolean

styleBuiltIn

Gets or sets 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.

[ API set: WordApi 1.3 ]

styleBuiltIn?: boolean;

Property Value

boolean

subtype

Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls. Read-only.

[ API set: WordApi 1.3 ]

subtype?: boolean;

Property Value

boolean

tag

Gets or sets a tag to identify a content control.

[ API set: WordApi 1.1 ]

tag?: boolean;

Property Value

boolean

text

Gets the text of the content control. Read-only.

[ API set: WordApi 1.1 ]

text?: boolean;

Property Value

boolean

title

Gets or sets the title for a content control.

[ API set: WordApi 1.1 ]

title?: boolean;

Property Value

boolean

type

Gets the content control type. Only rich text content controls are supported currently. Read-only.

[ API set: WordApi 1.1 ]

type?: boolean;

Property Value

boolean