Document Properties (Word)

GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Properties

Name

Description

ActiveTheme

Returns the name of the active theme plus the theme formatting options for the specified document. Read-only String.

ActiveThemeDisplayName

Returns the display name of the active theme for the specified document. Read-only String.

ActiveWindow

Returns a Window object that represents the active window (the window with the focus). Read-only.

ActiveWritingStyle

Returns or sets the writing style for a specified language in the specified document. Read/write String.

Application

Returns an Application object that represents the Microsoft Word application.

AttachedTemplate

Returns a Template object that represents the template attached to the specified document. Read/write Variant.

AutoFormatOverride

Returns or sets a Boolean that represents whether automatic formatting options override formatting restrictions in a document where formatting restrictions are in effect.

AutoHyphenation

True if automatic hyphenation is turned on for the specified document. Read/write Boolean.

Background

Returns a Shape object that represents the background image for the specified document. Read-only.

Bibliography

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

Bookmarks

Returns a Bookmarks collection that represents all the bookmarks in a document. Read-only.

Broadcast

Returns a Broadcast object that represents a broadcast session, in which presenters can present Word documents to remote participants over the web without the participants needing to have rich clients installed.

BuiltInDocumentProperties

Returns a DocumentProperties collection that represents all the built-in document properties for the specified document.

Characters

Returns a Characters collection that represents the characters in a document. Read-only.

ChartDataPointTrack

Returns or sets a Boolean that specifies whether charts in the active document use cell-reference data-point tracking. Read-write.

ClickAndTypeParagraphStyle

Returns or sets the default paragraph style applied to text by the Click and Type feature in the specified document. Read/write Variant.

CoAuthoring

Returns a CoAuthoring object that provides the entry point into the co-authoring object model. Read-only.

CodeName

Returns the code name for the specified document. Read-only String.

CommandBars

Returns a CommandBars collection that represents the menu bar and all the toolbars in Microsoft Word.

Comments

Returns a Comments collection that represents all the comments in the specified document. Read-only.

Compatibility

True if the compatibility option specified by the Type argument is enabled. Compatibility options affect how a document is displayed in Microsoft Word. Read/write Boolean.

CompatibilityMode

Returns a Long that specifies the compatibility mode that Word uses when opening the document. Read-only.

ConsecutiveHyphensLimit

Returns or sets the maximum number of consecutive lines that can end with hyphens. Read/write. Long.

Container

Returns the object that represents the container application for the specified document. Read-only Object.

Content

Returns a Range object that represents the main document story. Read-only.

ContentControls

Returns a ContentControls collection that represents all the content controls in a document. Read-only.

ContentTypeProperties

Returns a MetaProperties collection that represents the metadata stored in a document, such as author name, subject, and company. Read-only.

Creator

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

CurrentRsid

Returns a Long that represents a random number that Word assigns to changes in a document. Read-only.

CustomDocumentProperties

Returns a DocumentProperties collection that represents all the custom document properties for the specified document.

CustomXMLParts

Returns a CustomXMLParts collection that represents the custom XML in the XML data store. Read-only.

DefaultTableStyle

Returns a Variant that represents the table style that is applied to all newly created tables in a document. Read-only.

DefaultTabStop

Returns or sets the interval (in points) between the default tab stops in the specified document. Read/write Single.

DefaultTargetFrame

Returns or sets a String indicating the browser frame in which to display a Web page reached through a hyperlink. Read/write.

DisableFeatures

True disables all features introduced after the version specified in the DisableFeaturesIntroducedAfter property. The default value is False. Read/write Boolean.

DisableFeaturesIntroducedAfter

Disables all features introduced after a specified version of Microsoft Word in the document only. Read/write WdDisableFeaturesIntroducedAfter.

DocumentInspectors

Returns a DocumentInspectors collection that enables you to locate hidden personal information, such as author name, company name, and revision date. Read-only.

DocumentLibraryVersions

Returns a DocumentLibraryVersions collection that represents the collection of versions of a shared document that has versioning enabled and that is stored in a document library on a server.

DocumentTheme

Returns an OfficeTheme object that represents the Microsoft Office theme applied to a document. Read-only.

DoNotEmbedSystemFonts

True for Microsoft Word to not embed common system fonts. Read/write Boolean.

Email

Returns an Email object that contains all the e-mail–related properties of the current document. Read-only.

EmbedLinguisticData

True for Microsoft Word to embed speech and handwriting so that data can be converted back to speech or handwriting. Read/write Boolean.

EmbedTrueTypeFonts

True if Microsoft Word embeds TrueType fonts in a document when it is saved. Read/write Boolean.

EncryptionProvider

Returns a String specifying the name of the algorithm encryption provider that Microsoft Word uses when encrypting documents. Read/write.

Endnotes

Returns an Endnotes collection that represents all the endnotes in a document. Read-only.

EnforceStyle

Returns or sets a Boolean that represents whether formatting restrictions are enforced in a protected document.

Envelope

Returns an Envelope object that represents an envelope and envelope features in a document. Read-only.

FarEastLineBreakLanguage

Returns or sets a WdFarEastLineBreakLanguageID that represents the East Asian language to use when breaking lines of text in the specified document or template. Read/write.

FarEastLineBreakLevel

Returns or sets a WdFarEastLineBreakLevel that represents the line break control level for the specified document. Read/write.

Fields

Returns a Fields collection that represents all the fields in the document. Read-only.

Final

Returns or sets a Boolean that indicates whether a document is final. Read/write.

Footnotes

Returns a Footnotes collection that represents all the footnotes in a document. Read-only.

FormattingShowClear

True for Microsoft Word to show clear formatting in the Styles and Formatting task pane. Read/write Boolean.

FormattingShowFilter

Sets or returns a WdShowFilter constant that represents the styles and formatting displayed in the Styles and Formatting task pane. Read/write Boolean.

FormattingShowFont

True for Microsoft Word to display font formatting in the Styles and Formatting task pane. Read/write Boolean.

FormattingShowNextLevel

Returns or sets a Boolean that represents whether Microsoft Word shows the next heading level when the previous heading level is used. Read/write.

FormattingShowNumbering

True for Microsoft Word to display number formatting in the Styles and Formatting task pane. Read/write Boolean.

FormattingShowParagraph

True for Microsoft Word to display paragraph formatting in the Styles and Formatting task pane. Read/write Boolean.

FormattingShowUserStyleName

Returns or sets a Boolean that represents whether to show user-defined styles. Read/write.

FormFields

Returns a FormFields collection that represents all the form fields in the document. Read-only.

FormsDesign

True if the specified document is in form design mode. Read-only Boolean.

Frames

Returns a Frames collection that represents all the frames in a document. Read-only.

Frameset

Returns a Frameset object that represents an entire frames page or a single frame on a frames page. Read-only.

FullName

Returns a String that represents the name of a document, including the path. Read-only.

GrammarChecked

True if a grammar check has been run on the specified range or document. Read/write Boolean.

GrammaticalErrors

Returns a ProofreadingErrors collection that represents the sentences that failed the grammar check in the specified document. Read-only.

GridDistanceHorizontal

Returns or sets a Single that represents the amount of horizontal space between the invisible gridlines that Microsoft Word uses when you draw, move, and resize AutoShapes or East Asian characters in the specified document. Read/write.

GridDistanceVertical

Returns or sets a Single that represents the amount of vertical space between the invisible gridlines that Microsoft Word uses when you draw, move, and resize AutoShapes or East Asian characters in the specified document. Read/write.

GridOriginFromMargin

True if Microsoft Word starts the character grid from the upper-left corner of the page. Read/write Boolean.

GridOriginHorizontal

Returns or sets a Single that represents the point, relative to the left edge of the page, where you want the invisible grid for drawing, moving, and resizing AutoShapes or East Asian characters to begin in the specified document. Read/write.

GridOriginVertical

Returns or sets a Single that represents the point, relative to the top of the page, where you want the invisible grid for drawing, moving, and resizing AutoShapes or East Asian characters to begin in the specified document. Read/write.

GridSpaceBetweenHorizontalLines

Returns or sets the interval at which Microsoft Word displays horizontal character gridlines in print layout view. Read/write Long.

GridSpaceBetweenVerticalLines

Returns or sets the interval at which Microsoft Word displays vertical character gridlines in print layout view. Read/write Long.

HasPassword

True if a password is required to open the specified document. Read-only Boolean.

HasVBProject

Returns a Boolean that represents whether a document has an attached Microsoft Visual Basic for Applications project. Read-only.

HTMLDivisions

Returns an HTMLDivisions collection that represents the HTML DIV elements in a Web document.

Hyperlinks

Returns a Hyperlinks collection that represents all the hyperlinks in the specified document. Read-only.

HyphenateCaps

True if words in all capital letters can be hyphenated. Read/write Boolean.

HyphenationZone

Returns or sets the width of the hyphenation zone, in points. Read/write Long.

Indexes

Returns an Indexes collection that represents all the indexes in the specified document. Read-only.

InlineShapes

Returns an InlineShapes collection that represents all the InlineShape objects in a document. Read-only.

IsInAutosave

Returns False if the most recent firing of the Application.DocumentBeforeSave Event (Word) event was the result of a manual save by the user, and not an automatic save. Read-only.

IsMasterDocument

True if the specified document is a master document. Read-only Boolean.

IsSubdocument

True if the specified document is a subdocument of a master document. Read-only Boolean.

JustificationMode

Returns or sets the character spacing adjustment for the specified document. Read/write WdJustificationMode.

KerningByAlgorithm

True if Microsoft Word kerns half-width Latin characters and punctuation marks in the specified document. Read/write Boolean.

Kind

Returns or sets the format type that Microsoft Word uses when automatically formatting the specified document. Read/write WdDocumentKind.

LanguageDetected

Returns or sets a value that specifies whether Microsoft Word has detected the language of the specified text. Read/write Boolean.

ListParagraphs

Returns a ListParagraphsobject that represents all the numbered paragraphs in a document. Read-only.

Lists

Returns a Lists collection that contains all the formatted lists in the specified document. Read-only.

ListTemplates

Returns a ListTemplates collection that represents all the list formats for the specified document. Read-only.

LockQuickStyleSet

Returns or sets a Boolean that represents whether users can change which set of Quick Styles is being used. Read/write.

LockTheme

Returns or sets a Boolean that represents whether a user can change a document theme. Read/write.

MailEnvelope

Returns an MsoEnvelope object that represents an e-mail header for a document.

MailMerge

Returns a MailMerge object that represents the mail merge functionality for the specified document. Read-only.

Name

Returns the name of the specified object. Read-only String.

NoLineBreakAfter

Returns or sets the kinsoku characters after which Microsoft Word will not break a line. Read/write String.

NoLineBreakBefore

Returns or sets the kinsoku characters before which Microsoft Word will not break a line. Read/write String.

OMathBreakBin

Returns or sets a WdOMathBreakBin constant that represents where Microsoft Word places binary operators when equations span two or more lines. Read/write.

OMathBreakSub

Returns or sets a WdOMathBreakSub constant that represents how Microsoft Word handles a subtraction operator that falls before a line break. Read/write.

OMathFontName

Returns or sets a String that represents the name of the font used in a document to display equations. Read/write.

OMathIntSubSupLim

Returns or sets a Boolean that represents the default location of limits for integrals. Read/write.

OMathJc

Returns or sets a WdOMathJc constant that represents the default justification—left, right, centered, or centered as a group—of a group of equations. Read/write.

OMathLeftMargin

Returns or sets a Single that represents the left margin for equations. Read/write.

OMathNarySupSubLim

Returns or sets a Boolean that represents the default location of limits for n-ary objects other than integrals. Read/write.

OMathRightMargin

Returns or sets a Single that represents the right margin for equations. Read/write.

OMaths

Returns an OMaths collection that represents the OMath objects within the specified range. Read-only.

OMathSmallFrac

Returns or sets a Boolean that represents whether to use small fractions in equations contained within the document. Read/write.

OMathWrap

Returns or sets a Single that represents the placement of the second line of an equation that wraps to a new line. Read/write.

OpenEncoding

Returns the encoding used to open the specified document. Read-only MsoEncoding.

OptimizeForWord97

True if Microsoft Word optimizes the current document for viewing in Microsoft Word 97 by disabling any incompatible formatting. Read/write Boolean.

OriginalDocumentTitle

Returns a String that represents the document title for the original document after running a legal-blackline document compare function. Read-only.

PageSetup

Returns a PageSetup object that is associated with the specified document.

Paragraphs

Returns a Paragraphs collection that represents all the paragraphs in the specified document. Read-only.

Parent

Returns an Object that represents the parent object of the specified Document object.

Password

Sets a password that must be supplied to open the specified document. Write-only String.

PasswordEncryptionAlgorithm

Returns a String indicating the algorithm Microsoft Word uses for encrypting documents with passwords. Read-only.

PasswordEncryptionFileProperties

True if Microsoft Word encrypts file properties for password-protected documents. Read-only Boolean.

PasswordEncryptionKeyLength

Returns a Long indicating the key length of the algorithm Microsoft Word uses when encrypting documents with passwords. Read-only.

PasswordEncryptionProvider

Returns a String specifying the name of the algorithm encryption provider that Microsoft Word uses when encrypting documents with passwords. Read-only.

Path

Returns the disk or Web path to the document. Read-only String.

Permission

Returns a Permission object that represents the permission settings in the specified document.

PrintFormsData

True if Microsoft Word prints onto a preprinted form only the data entered in the corresponding online form. Read/write Boolean.

PrintPostScriptOverText

True if PRINT field instructions (such as PostScript commands) in a document are to be printed on top of text and graphics when a PostScript printer is used. Read/write Boolean.

PrintRevisions

True if revision marks are printed with the document. False if revision marks aren't printed (that is, tracked changes are printed as if they'd been accepted). Read/write Boolean.

ProtectionType

Returns the protection type for the specified document. Can be one of the following WdProtectionType constants: wdAllowOnlyComments, wdAllowOnlyFormFields, wdAllowOnlyReading, wdAllowOnlyRevisions, or wdNoProtection.

ReadabilityStatistics

Returns a ReadabilityStatistics collection that represents the readability statistics for the specified document or range. Read-only.

ReadingLayoutSizeX

Sets or returns a Long that represents the width of pages in a document when it is displayed in reading layout view and is frozen for entering handwritten markup.

ReadingLayoutSizeY

Sets or returns a Long that represents the height of pages in a document when it is displayed in reading layout view and is frozen for entering handwritten markup.

ReadingModeLayoutFrozen

Sets or returns a Boolean that represents whether pages displayed in reading layout view are frozen to a specified size for inserting handwritten markup into a document.

ReadOnly

True if changes to the document cannot be saved to the original document. Read-only Boolean.

ReadOnlyRecommended

True if Microsoft Word displays a message box whenever a user opens the document, suggesting that it be opened as read-only. Read/write Boolean.

RemoveDateAndTime

Sets or returns a Boolean indicating whether a document stores the date and time metadata for tracked changes. .

RemovePersonalInformation

True if Microsoft Word removes all user information from comments, revisions, and the Properties dialog box upon saving a document. Read/write Boolean.

Research

Returns a Research object that represents the research service for a document. Read-only.

RevisedDocumentTitle

Returns a String that represents the document title for a revised document after running a legal-blackline document compare function. Read-only.

Revisions

Returns a Revisions collection that represents the tracked changes in the document or range. Read-only.

Saved

True if the specified document or template has not changed since it was last saved. False if Microsoft Word displays a prompt to save changes when the document is closed. Read/write Boolean.

SaveEncoding

Returns or sets the encoding to use when saving a document. Read/write MsoEncoding.

SaveFormat

Returns the file format of the specified document or file converter. Read-only Long.

SaveFormsData

True if Microsoft Word saves the data entered in a form as a tab-delimited record for use in a database. Read/write Boolean.

SaveSubsetFonts

True if Microsoft Word saves a subset of the embedded TrueType fonts with the document. Read/write Boolean.

Scripts

Returns a Scripts collection that represents the collection of HTML scripts in the specified object.

Sections

Returns a Section collection that represents the sections in the specified document. Read-only.

Sentences

Returns a Sentences collection that represents all the sentences in the document. Read-only.

ServerPolicy

Returns a ServerPolicy object that represents a policy specified for a document stored on a server running Microsoft Office SharePoint Server 2007. Read-only.

Shapes

Returns a Shapes collection that represents all the Shape objects in the specified document. Read-only.

ShowGrammaticalErrors

True if grammatical errors are marked by a wavy green line in the specified document. Read/write Boolean.

ShowSpellingErrors

True if Microsoft Word underlines spelling errors in the document. Read/write Boolean.

Signatures

Returns a SignatureSet collection that represents the digital signatures for a document.

SmartDocument

Returns a SmartDocument object that represents the settings for a smart document solution.

SnapToGrid

True if AutoShapes or East Asian characters are automatically aligned with an invisible grid when they are drawn, moved, or resized in the specified document. Read/write Boolean.

SnapToShapes

True if Microsoft Word automatically aligns AutoShapes or East Asian characters with invisible gridlines that go through the vertical and horizontal edges of other AutoShapes or East Asian characters in the specified document. Read/write Boolean.

SpellingChecked

True if spelling has been checked throughout the specified range or document. False if all or some of the range or document has not been checked for spelling. Read/write Boolean.

SpellingErrors

Returns a ProofreadingErrors collection that represents the words identified as spelling errors in the specified document or range. Read-only.

StoryRanges

Returns a StoryRanges collection that represents all the stories in the specified document. Read-only.

Styles

Returns a Styles collection for the specified document. Read-only.

StyleSheets

Returns a StyleSheets collection that represents the Web style sheets attached to a document.

StyleSortMethod

Returns or sets aWdStyleSort constant that represents the sort method to use when sorting styles in the Styles task pane. Read/write.

Subdocuments

Returns a Subdocuments collection that represents all the subdocuments in the specified document. Read-only.

Sync

This object or member has been deprecated, but it remains part of the object model for backward compatibility. You should not use it in new applications.

Tables

Returns a Table collection that represents all the tables in the specified document. Read-only.

TablesOfAuthorities

Returns a TableOfAuthorities collection that represents the tables of authorities in the specified document. Read-only.

TablesOfAuthoritiesCategories

Returns a TablesOfAuthoritiesCategories collection that represents the available table of authorities categories for the specified document. Read-only.

TablesOfContents

Returns a TablesOfContents collection that represents the tables of contents in the specified document. Read-only.

TablesOfFigures

Returns a TablesOfFigures collection that represents the tables of figures in the specified document. Read-only.

TextEncoding

Returns or sets the code page, or character set, that Microsoft Word uses for a document saved as an encoded text file. Read/write MsoEncoding.

TextLineEnding

Returns or sets a WdLineEndingType constant indicating how Microsoft Word marks the line and paragraph breaks in documents saved as text files. Read/write.

TrackFormatting

Returns or sets a Boolean that represents whether to track formatting changes when change tracking is turned on. Read/write.

TrackMoves

Returns or sets a Boolean that represents whether to mark moved text when Track Changes is turned on. Read/write.

TrackRevisions

True if changes are tracked in the specified document. Read/write Boolean.

Type

Returns the document type (template or document). Read-only WdDocumentType.

UpdateStylesOnOpen

True if the styles in the specified document are updated to match the styles in the attached template each time the document is opened. Read/write Boolean.

UseMathDefaults

Returns or sets a Boolean that represents whether to use the default math settings when creating new equations. Read/write.

UserControl

True if the document was created or opened by the user. Read/write Boolean.

Variables

Returns a Variables collection that represents the variables stored in the specified document. Read-only.

VBASigned

True if the Microsoft Visual Basic for Applications (VBA) project for the specified document has been digitally signed. Read-only Boolean.

VBProject

Returns the VBProject object for the specified template or document.

WebOptions

Returns the WebOptions object, which contains document-level attributes used by Microsoft Word when you save a document as a Web page or open a Web page. Read-only.

Windows

Returns a Windows collection that represents all windows for the specified document. Read-only.

WordOpenXML

Returns a String that represents the flat XML format for the Word Open XML contents of the document. Read-only.

Words

Returns a Words collection that represents all the words in a document. Read-only.

WritePassword

Sets a password for saving changes to the specified document. Write-only String.

WriteReserved

True if the specified document is protected with a write password. Read-only Boolean.

XMLSaveThroughXSLT

Sets or returns a String that specifies the path and file name for the Extensible Stylesheet Language Transformation (XSLT) to apply when a user saves a document.

XMLSchemaReferences

Returns an XMLSchemaReferences collection that represents the schemas attached to a document.

XMLShowAdvancedErrors

Returns or sets a Boolean that represents whether error message text is generated from the built-in Microsoft Word error messages or from the Microsoft XML Core Services (MSXML) 5.0 component included with Office.

XMLUseXSLTWhenSaving

Returns a Boolean that represents whether to save a document through an Extensible Stylesheet Language Transformation (XSLT). True saves a document through an XSLT.