What's new in Word JavaScript API 1.7
WordApi 1.7 mainly added support for writing assistance.
API list
The following table lists the APIs in Word JavaScript API requirement set 1.7. To view API reference documentation for all APIs supported by Word JavaScript API requirement set 1.7 or earlier, see Word APIs in requirement set 1.7 or earlier.
Class | Fields | Description |
---|---|---|
Annotation | critiqueAnnotation | Gets the critique annotation object. |
delete() | Deletes the annotation. | |
id | Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. | |
state | Gets the state of the annotation. | |
AnnotationClickedEventArgs | id | Specifies the annotation ID for which the event was fired. |
AnnotationCollection | getFirst() | Gets the first annotation in this collection. |
getFirstOrNullObject() | Gets the first annotation in this collection. | |
items | Gets the loaded child items in this collection. | |
AnnotationHoveredEventArgs | id | Specifies the annotation ID for which the event was fired. |
AnnotationInsertedEventArgs | ids | Specifies the annotation IDs for which the event was fired. |
AnnotationRemovedEventArgs | ids | Specifies the annotation IDs for which the event was fired. |
AnnotationSet | critiques | Critiques. |
CheckboxContentControl | isChecked | Specifies the current state of the checkbox. |
ContentControl | checkboxContentControl | Gets the data of the content control when its type is 'CheckBox'. |
Critique | colorScheme | Specifies the color scheme of the critique. |
length | Specifies the length of the critique inside paragraph. | |
start | Specifies the start index of the critique inside paragraph. | |
CritiqueAnnotation | accept() | Accepts the critique. |
critique | Gets the critique that was passed when the annotation was inserted. | |
range | Gets the range of text that is annotated. | |
reject() | Rejects the critique. | |
Document | getAnnotationById(id: string) | Gets the annotation by ID. |
onAnnotationClicked | Occurs when the user clicks an annotation (or selects it using Alt+Down). | |
onAnnotationHovered | Occurs when the user hovers the cursor over an annotation. | |
onAnnotationInserted | Occurs when the user adds one or more annotations. | |
onAnnotationRemoved | Occurs when the user deletes one or more annotations. | |
search(searchText: string, searchOptions?: Word.SearchOptions | { ignorePunct?: boolean ignoreSpace?: boolean matchCase?: boolean matchPrefix?: boolean matchSuffix?: boolean matchWholeWord?: boolean matchWildcards?: boolean }) | Performs a search with the specified search options on the scope of the whole document. | |
GetTextOptions | includeHiddenText | Specifies a value that indicates whether to include hidden text in the result of the GetText method. |
includeTextMarkedAsDeleted | Specifies a value that indicates whether to include text marked as deleted in the result of the GetText method. | |
InsertFileOptions | importDifferentOddEvenPages | Represents whether to import the Different Odd and Even Pages setting for the header and footer from the source document. |
Paragraph | getAnnotations() | Gets annotations set on this Paragraph object. |
getText(options?: Word.GetTextOptions | { IncludeHiddenText?: boolean IncludeTextMarkedAsDeleted?: boolean }) | Returns the text of the paragraph. | |
insertAnnotations(annotations: Word.AnnotationSet) | Inserts annotations on this Paragraph object. |
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Add-ins