Edit

Share via


Word.Interfaces.DocumentLoadOptions interface

The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document.

Remarks

[ API set: WordApi 1.1 ]

Properties

$all

Specifying $all for the load options loads all the scalar properties (such as Range.address) but not the navigational properties (such as Range.format.fill.color).

attachedTemplate

Specifies a Template object that represents the template attached to the document.

autoHyphenation

Specifies if automatic hyphenation is turned on for the document.

autoSaveOn

Specifies if the edits in the document are automatically saved.

bibliography

Returns a Bibliography object that represents the bibliography references contained within 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.

consecutiveHyphensLimit

Specifies the maximum number of consecutive lines that can end with hyphens.

hyphenateCaps

Specifies whether words in all capital letters can be hyphenated.

languageDetected

Specifies whether Microsoft Word has detected the language of the document text.

pageSetup

Returns a PageSetup object that's associated with 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.

Property Details

$all

Specifying $all for the load options loads all the scalar properties (such as Range.address) but not the navigational properties (such as Range.format.fill.color).

$all?: boolean;

Property Value

boolean

attachedTemplate

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.

Specifies a Template object that represents the template attached to the document.

attachedTemplate?: Word.Interfaces.TemplateLoadOptions;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

autoHyphenation

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.

Specifies if automatic hyphenation is turned on for the document.

autoHyphenation?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

autoSaveOn

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.

Specifies if the edits in the document are automatically saved.

autoSaveOn?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

bibliography

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.

Returns a Bibliography object that represents the bibliography references contained within the document.

bibliography?: Word.Interfaces.BibliographyLoadOptions;

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.BodyLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.1 ]

changeTrackingMode

Specifies the ChangeTracking mode.

changeTrackingMode?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.4 ]

consecutiveHyphensLimit

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.

Specifies the maximum number of consecutive lines that can end with hyphens.

consecutiveHyphensLimit?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

hyphenateCaps

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.

Specifies whether words in all capital letters can be hyphenated.

hyphenateCaps?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

languageDetected

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.

Specifies whether Microsoft Word has detected the language of the document text.

languageDetected?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

pageSetup

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.

Returns a PageSetup object that's associated with the document.

pageSetup?: Word.Interfaces.PageSetupLoadOptions;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

properties

Gets the properties of the document.

properties?: Word.Interfaces.DocumentPropertiesLoadOptions;

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 ]