Compatibility Property

Microsoft Word Visual Basic

expression.Compatibility(Type)

expression    Required. An expression that returns a Document object.

Type   Required WdCompatibility. The compatibility option.

WdCompatibility can be one of these WdCompatibility constants.
wdAlignTablesRowByRow
wdApplyBreakingRules
wdAutospaceLikeWW7
wdConvMailMergeEsc
wdDontAdjustLineHeightInTable
wdDontBalanceSingleByteDoubleByteWidth
wdDontBreakWrappedTables
wdDontSnapTextToGridInTableWithObjects
wdDontULTrailSpace
wdDontUseHTMLParagraphAutoSpacing
wdExactOnTop
wdExpandShiftReturn
wdFootnoteLayoutLikeWW8
wdForgetLastTabAlignment
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
wdUsePrinterMetrics
wdWPJustification
wdWrapTrailSpaces
wdTruncateFontHeight
wdUseWord97LineBreakingRules
wdWPSpaceWidth
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)