Compatibility Property

Applies To

Document object.

Description

True if the compatibility option specified by the Type argument is enabled. Compatibility options affect how a document is displayed in Word. These options are listed on the Compatibility tab in the Options dialog box (Tools menu). Read/write Boolean.

Syntax

expression.Compatibility(Type)

expression Required. An expression that returns a Document object.

Type Required Long. Can be one of the following WdCompatibility constants.

Constant

Description

wdConvMailMergeEsc

Word 97 correctly interprets characters preceded by backslashes (\) in Word version 2.x mail-merge data sources. For example, \" is interpreted as ".

wdExactOnTop

Word 97 places text at the top of the space allocated for the line when using exact line spacing.

wdLineWrapLikeWord6

Not used in U.S. English Word.

wdMWSmallCaps

Word 97 applies small capital letter ("small caps") formatting as in Word version 5.x for the Macintosh, which produces slightly larger small caps.

wdNoColumnBalance

Word 97 doesn't balance text columns above continuous section breaks.

wdNoExtraLineSpacing

Word 97 handles line spacing as in WordPerfect version 5.x. This argument is available only in Word version 7.0.

wdNoLeading

Word 97 displays lines of text without leading as in Word version 5.x for the Macintosh.

wdNoSpaceForUL

Word 97 doesn't add extra space for underlines. This argument is available only in Word version 7.0.

wdNoSpaceRaiseLower

Word 97 doesn't add extra line spacing for raised and lowered characters.

wdNoTabHangIndent

Word 97 doesn't automatically add a tab stop to a paragraph formatted with a hanging indent.

wdOrigWordTableRules

Word 97 combines table borders as in Word version 5.x for the Macintosh.

wdPrintBodyTextBeforeHeader

Word 97 prints the main text layer before the header and footer layer (the reverse of the default order). This allows Word to process PostScript codes in the main text layer the same as in Word version 5.x for the Macintosh.

wdPrintColBlack

Word 97 prints colors as black on printers that don't support color.

wdShowBreaksInFrames

Word 97 displays manual ("hard") page or column breaks in any frames that contain them.

wdSpacingInWholePoints

Word 97 rounds character-spacing measurements up or down to the nearest whole number.


(continued)

wdSubFontBySize

Word 97 substitutes fonts based on the font size in WordPerfect version 6.0 documents. This argument is available only in Word version 7.0.

wdSuppressBottomSpacing

Word 97 removes extra line spacing at the bottom of the page.

wdSuppressSpBfAfterPgBrk

Word 97 removes space before or after hard page breaks and column breaks.

wdSuppressTopSpacing

Word 97 removes extra line spacing at the top of the page.

wdSuppressTopSpacingMac5

Word 97 handles extra line spacing at the top of the page the same as in Word version 5.x for the Macintosh.

wdSwapBordersFacingPages

Word 97 prints a left paragraph border (not a box) on the right side on odd-numbered pages if either the Different odd and even check box (Layout tab) or the Mirror margins check box (Margins tab) is selected in the Page Setup dialog box (File menu).

wdTransparentMetafiles

Word 97 doesn't "blank" the area behind metafile pictures.

wdTruncateFontHeight

Word 97 rounds the font size up or down as in WordPerfect version 6.x for Windows. This argument is available only in Word version 7.0.

wdUsePrinterMetrics

Word 97 uses printer metrics to lay out the document.

wdWPJustification

Word 97 lays out fully justified text the same as in WordPerfect version 6.x.

wdWPSpaceWidth

Word 97 sets the default width of spaces between words to be the same as in WordPerfect version 5.x for Windows and WordPerfect version 6.0 for DOS.

wdWrapTrailSpaces

Word 97 wraps spaces at the end of lines to the next line.

wdWW6BorderRules

Word 97 handles left and right borders of text lines affected by frames the same as in Word version 6.x.


Note The constants wdLeaveBackslashAlone, wdExpandShiftReturn, wdDontULTrailSpace, and wdDontBalanceSingleByteDoubleByteWidth are not used in U.S. English Word.

See Also

MakeCompatibilityDefault method.

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)