SmartFormat Method

Home Page (Objects)OverviewFAQReference

Applies to: TextSelection object

Formats text in a selection according to the current smart formatting settings.

Syntax

object.SmartFormat

Parameters

object

An expression that evaluates to a TextSelection object.

Remarks

By default, the SmartFormat method formats selected text according to the smart formatting settings defined on the Tabs tab of the Options dialog box (Tools menu, Options command). However, you can apply custom smart formatting to selected text by using the Format Selection command (Edit menu, Advanced command).

Example

The following example formats text in a selection according to the current smart format settings:

ActiveDocument.Selection.SmartFormat