Word.Interfaces.DocumentData interface

An interface describing the data returned by calling document.toJSON().

Properties

activeWindow

Gets the active window for the document.

body

Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.

changeTrackingMode

Specifies the ChangeTracking mode.

contentControls

Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc.

customXmlParts

Gets the custom XML parts in the document.

properties

Gets the properties of the document.

saved

Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved.

sections

Gets the collection of section objects in the document.

settings

Gets the add-in's settings in the document.

windows

Gets the collection of Word.Window objects for the document.

Property Details

activeWindow

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the active window for the document.

activeWindow?: Word.Interfaces.WindowData;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

body

Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.

body?: Word.Interfaces.BodyData;

Property Value

Remarks

[ API set: WordApi 1.1 ]

changeTrackingMode

Specifies the ChangeTracking mode.

changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly";

Property Value

Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"

Remarks

[ API set: WordApi 1.4 ]

contentControls

Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc.

contentControls?: Word.Interfaces.ContentControlData[];

Property Value

Remarks

[ API set: WordApi 1.1 ]

customXmlParts

Gets the custom XML parts in the document.

customXmlParts?: Word.Interfaces.CustomXmlPartData[];

Property Value

Remarks

[ API set: WordApi 1.4 ]

properties

Gets the properties of the document.

properties?: Word.Interfaces.DocumentPropertiesData;

Property Value

Remarks

[ API set: WordApi 1.3 ]

saved

Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved.

saved?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

sections

Gets the collection of section objects in the document.

sections?: Word.Interfaces.SectionData[];

Property Value

Remarks

[ API set: WordApi 1.1 ]

settings

Gets the add-in's settings in the document.

settings?: Word.Interfaces.SettingData[];

Property Value

Remarks

[ API set: WordApi 1.4 ]

windows

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the collection of Word.Window objects for the document.

windows?: Word.Interfaces.WindowData[];

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]