Word.Interfaces.ContentControlData interface
An interface describing the data returned by calling contentControl.toJSON().
Properties
| appearance | Specifies the appearance of the content control. The value can be |
| building |
Gets the building block gallery-related data if the content control's Word.ContentControlType is |
| cannot |
Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with |
| cannot |
Specifies a value that indicates whether the user can edit the contents of the content control. |
| checkbox |
Gets the data of the content control when its type is |
| color | Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. |
| combo |
Gets the data of the content control when its type is |
| content |
Gets the collection of |
| date |
Gets the date picker-related data if the content control's Word.ContentControlType is |
| drop |
Gets the data of the content control when its type is |
| fields | Gets the collection of |
| font | Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. |
| group |
Gets the group-related data if the content control's Word.ContentControlType is |
| id | Gets an integer that represents the content control identifier. |
| inline |
Gets the collection of |
| lists | Gets the collection of |
| paragraphs | Gets the collection of |
| picture |
Gets the picture-related data if the content control's Word.ContentControlType is |
| placeholder |
Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. |
| remove |
Specifies a value that indicates whether the content control is removed after it's edited. Mutually exclusive with |
| repeating |
Gets the repeating section-related data if the content control's Word.ContentControlType is |
| style | 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 |
| style |
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 |
| subtype | Gets the content control subtype. The subtype can be |
| tables | Gets the collection of |
| tag | Specifies a tag to identify a content control. |
| text | Gets the text of the content control. |
| title | Specifies the title for a content control. |
| type | Gets the content control type. Only rich text, plain text, check box, dropdown list, combo box, building block gallery, date picker, repeating section, picture, and group content controls are supported currently. |
| xml |
Returns an |
Property Details
appearance
Specifies the appearance of the content control. The value can be boundingBox, tags, or hidden.
appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden";
Property Value
Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"
Remarks
buildingBlockGalleryContentControl
Gets the building block gallery-related data if the content control's Word.ContentControlType is buildingBlockGallery. It's null otherwise.
buildingBlockGalleryContentControl?: Word.Interfaces.BuildingBlockGalleryContentControlData;
Property Value
Remarks
cannotDelete
Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited.
cannotDelete?: boolean;
Property Value
boolean
Remarks
cannotEdit
Specifies a value that indicates whether the user can edit the contents of the content control.
cannotEdit?: boolean;
Property Value
boolean
Remarks
checkboxContentControl
Gets the data of the content control when its type is checkBox. It's null otherwise.
checkboxContentControl?: Word.Interfaces.CheckboxContentControlData;
Property Value
Remarks
color
Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name.
color?: string;
Property Value
string
Remarks
comboBoxContentControl
Gets the data of the content control when its type is comboBox. It's null otherwise.
comboBoxContentControl?: Word.Interfaces.ComboBoxContentControlData;
Property Value
Remarks
contentControls
Gets the collection of ContentControl objects in the content control.
contentControls?: Word.Interfaces.ContentControlData[];
Property Value
Remarks
datePickerContentControl
Gets the date picker-related data if the content control's Word.ContentControlType is datePicker. It's null otherwise.
datePickerContentControl?: Word.Interfaces.DatePickerContentControlData;
Property Value
Remarks
dropDownListContentControl
Gets the data of the content control when its type is dropDownList. It's null otherwise.
dropDownListContentControl?: Word.Interfaces.DropDownListContentControlData;
Property Value
Remarks
fields
Gets the collection of Field objects in the content control.
fields?: Word.Interfaces.FieldData[];
Property Value
Remarks
font
Gets the text format of the content control. Use this to get and set font name, size, color, and other properties.
font?: Word.Interfaces.FontData;
Property Value
Remarks
groupContentControl
Gets the group-related data if the content control's Word.ContentControlType is group. It's null otherwise.
groupContentControl?: Word.Interfaces.GroupContentControlData;
Property Value
Remarks
id
Gets an integer that represents the content control identifier.
id?: number;
Property Value
number
Remarks
inlinePictures
Gets the collection of InlinePicture objects in the content control. The collection doesn't include floating images.
inlinePictures?: Word.Interfaces.InlinePictureData[];
Property Value
Remarks
lists
Gets the collection of List objects in the content control.
lists?: Word.Interfaces.ListData[];
Property Value
Remarks
paragraphs
Gets the collection of Paragraph objects in the content control.
paragraphs?: Word.Interfaces.ParagraphData[];
Property Value
Remarks
Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control aren't returned. From requirement set 1.3, paragraphs in such tables are also returned.
pictureContentControl
Gets the picture-related data if the content control's Word.ContentControlType is picture. It's null otherwise.
pictureContentControl?: Word.Interfaces.PictureContentControlData;
Property Value
Remarks
placeholderText
Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty.
placeholderText?: string;
Property Value
string
Remarks
removeWhenEdited
Specifies a value that indicates whether the content control is removed after it's edited. Mutually exclusive with cannotDelete.
removeWhenEdited?: boolean;
Property Value
boolean
Remarks
repeatingSectionContentControl
Gets the repeating section-related data if the content control's Word.ContentControlType is repeatingSection. It's null otherwise.
repeatingSectionContentControl?: Word.Interfaces.RepeatingSectionContentControlData;
Property Value
Remarks
style
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?: string;
Property Value
string
Remarks
styleBuiltIn
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?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6";
Property Value
Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"
Remarks
subtype
Gets the content control subtype. The subtype can be richTextInline, richTextParagraphs, richTextTableCell, richTextTableRow and richTextTable for rich text content controls, plainTextInline and plainTextParagraph for plain text content controls, checkBox for checkbox content controls, dropDownList for dropdown list content controls, comboBox for combo box content controls, buildingBlockGallery for building block gallery content controls, datePicker for date picker content controls, repeatingSection for repeating section content controls, picture for picture content controls, and group for group content controls.
subtype?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group";
Property Value
Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group"
Remarks
tables
Gets the collection of Table objects in the content control.
tables?: Word.Interfaces.TableData[];
Property Value
Remarks
tag
Specifies a tag to identify a content control.
tag?: string;
Property Value
string
Remarks
text
Gets the text of the content control.
text?: string;
Property Value
string
Remarks
title
Specifies the title for a content control.
title?: string;
Property Value
string
Remarks
type
Gets the content control type. Only rich text, plain text, check box, dropdown list, combo box, building block gallery, date picker, repeating section, picture, and group content controls are supported currently.
type?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group";
Property Value
Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group"
Remarks
xmlMapping
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.XmlMappingData;