What's new in Word JavaScript API 1.9
WordApi 1.9 mainly included support for additional types of content controls. This improves the quality of data entry by having the user choose from a valid set of options.
API list
The following table lists the APIs in Word JavaScript API requirement set 1.9. To view API reference documentation for all APIs supported by Word JavaScript API requirement set 1.9 or earlier, see Word APIs in requirement set 1.9 or earlier.
Class | Fields | Description |
---|---|---|
ComboBoxContentControl | addListItem(displayText: string, value?: string, index?: number) | Adds a new list item to this combo box content control and returns a Word.ContentControlListItem object. |
deleteAllListItems() | Deletes all list items in this combo box content control. | |
listItems | Gets the collection of list items in the combo box content control. | |
ContentControl | comboBoxContentControl | Gets the data of the content control when its type is 'ComboBox'. |
dropDownListContentControl | Gets the data of the content control when its type is 'DropDownList'. | |
ContentControlListItem | delete() | Deletes the list item. |
displayText | Specifies the display text of a list item for a dropdown list or combo box content control. | |
index | Specifies the index location of a content control list item in the collection of list items. | |
select() | Selects the list item and sets the text of the content control to the value of the list item. | |
value | Specifies the programmatic value of a list item for a dropdown list or combo box content control. | |
ContentControlListItemCollection | getFirst() | Gets the first list item in this collection. |
getFirstOrNullObject() | Gets the first list item in this collection. | |
items | Gets the loaded child items in this collection. | |
DropDownListContentControl | addListItem(displayText: string, value?: string, index?: number) | Adds a new list item to this dropdown list content control and returns a Word.ContentControlListItem object. |
deleteAllListItems() | Deletes all list items in this dropdown list content control. | |
listItems | Gets the collection of list items in the dropdown list content control. |
See also
Współpracuj z nami w serwisie GitHub
Źródło tej zawartości można znaleźć w witrynie GitHub, gdzie można również tworzyć i przeglądać problemy i żądania ściągnięcia. Więcej informacji znajdziesz w naszym przewodniku dla współtwórców.