Share via


Compatibility Property

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.

expression.Compatibility(Type)

expression Required. An expression that returns a Document object.

WdCompatibility

WdCompatibility can be one of these WdCompatibility constants.
wdAlignTablesRowByRow
wdApplyBreakingRules
wdAutospaceLikeWW7
wdConvMailMergeEsc
wdDontAdjustLineHeightInTable
wdDontBalanceSingleByteDoubleByteWidth
wdDontBreakWrappedTables
wdDontSnapTextToGridInTableWithObjects
wdDontULTrailSpace
wdDontUseAsianBreakRulesInGrid
wdDontUseHTMLParagraphAutoSpacing
wdDontWrapTextWithPunctuation
wdExactOnTop
wdExpandShiftReturn
wdFootnoteLayoutLikeWW8
wdForgetLastTabAlignment
wdGrowAutofit
wdLayoutRawTableWidth
wdLayoutTableRowsApart
wdLeaveBackslashAlone
wdLineWrapLikeWord6
wdMWSmallCaps
wdNoColumnBalance
wdNoExtraLineSpacing
wdNoLeading
wdNoSpaceForUL
wdNoSpaceRaiseLower
wdNoTabHangIndent
wdOrigWordTableRules
wdPrintBodyTextBeforeHeader
wdPrintColBlack
wdSelectFieldWithFirstOrLastCharacter
wdShapeLayoutLikeWW8
wdShowBreaksInFrames
wdSpacingInWholePoints
wdSubFontBySize
wdSuppressBottomSpacing
wdSuppressSpBfAfterPgBrk
wdSuppressTopSpacing
wdSuppressTopSpacingMac5
wdSwapBordersFacingPages
wdTransparentMetafiles
wdTruncateFontHeight
wdUsePrinterMetrics
wdUseWord2002TableStyleRules
wdUseWord97LineBreakingRules
wdWPJustification
wdWPSpaceWidth
wdWrapTrailSpaces
wdWW6BorderRules

Remarks

Some of the constants listed above may not be available to you, depending on the language support (U.S. English, for example) that you've selected or installed.

Example

This example enables the Suppress Space Before after a hard page or column break option on the Compatibility tab in the Options dialog box (Tools menu) for the active document.

ActiveDocument.Compatibility(wdSuppressSpBfAfterPgBrk) = True

This example toggles the Don't add automatic tab stop for hanging indent option on or off.

ActiveDocument.Compatibility(wdNoTabHangIndent) = Not _
    ActiveDocument.Compatibility(wdNoTabHangIndent)

Applies to | Document Object

See Also | MakeCompatibilityDefault Method