What's new in Word JavaScript API 1.6

WordApi 1.6 mainly added enhanced support for management of styles and tracked changes.

API list

The following table lists the APIs in Word JavaScript API requirement set 1.6. To view API reference documentation for all APIs supported by Word JavaScript API requirement set 1.6 or earlier, see Word APIs in requirement set 1.6 or earlier.

Class Fields Description
Application openDocument(filePath: string) Opens a document and displays it in a new tab or window.
Body getTrackedChanges() Gets the collection of the TrackedChange objects in the body.
ContentControl getTrackedChanges() Gets the collection of the TrackedChange objects in the content control.
Document getParagraphByUniqueLocalId(id: string) Gets the paragraph by its unique local ID.
importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior) Import styles from a JSON-formatted string.
onParagraphAdded Occurs when the user adds new paragraphs.
onParagraphChanged Occurs when the user changes paragraphs.
onParagraphDeleted Occurs when the user deletes paragraphs.
InsertFileOptions importCustomProperties Represents whether the custom properties from the source document should be imported.
importCustomXmlParts Represents whether the custom XML parts from the source document should be imported.
Paragraph getTrackedChanges() Gets the collection of the TrackedChange objects in the paragraph.
uniqueLocalId Gets a string that represents the paragraph identifier in the current session.
ParagraphAddedEventArgs source The source of the event.
type The event type.
uniqueLocalIds Gets the unique IDs of the involved paragraphs.
ParagraphChangedEventArgs source The source of the event.
type The event type.
uniqueLocalIds Gets the unique IDs of the involved paragraphs.
ParagraphDeletedEventArgs source The source of the event.
type The event type.
uniqueLocalIds Gets the unique IDs of the involved paragraphs.
Range getTrackedChanges() Gets the collection of the TrackedChange objects in the range.
Shading backgroundPatternColor Specifies the color for the background of the object.
Style shading Gets a Shading object that represents the shading for the specified style.
tableStyle Gets a TableStyle object representing Style properties that can be applied to a table.
TableStyle bottomCellMargin Specifies the amount of space to add between the contents and the bottom borders of the cells.
cellSpacing Specifies the spacing (in points) between the cells in a table style.
leftCellMargin Specifies the amount of space to add between the contents and the left borders of the cells.
rightCellMargin Specifies the amount of space to add between the contents and the right borders of the cells.
topCellMargin Specifies the amount of space to add between the contents and the top borders of the cells.
TrackedChange accept() Accepts the tracked change.
author Gets the author of the tracked change.
date Gets the date of the tracked change.
getNext() Gets the next tracked change.
getNextOrNullObject() Gets the next tracked change.
getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End") Gets the range of the tracked change.
reject() Rejects the tracked change.
text Gets the text of the tracked change.
type Gets the type of the tracked change.
TrackedChangeCollection acceptAll() Accepts all the tracked changes in the collection.
getFirst() Gets the first TrackedChange in this collection.
getFirstOrNullObject() Gets the first TrackedChange in this collection.
items Gets the loaded child items in this collection.
rejectAll() Rejects all the tracked changes in the collection.

See also