TEXTWIDTH Function

Returns the width of the composed text in a shape.

Syntax

TEXTWIDTH(shapename!TheText,maximumwidth)

Remarks

The TEXTWIDTH function is commonly used to adjust the width of a shape to fit the text it contains.

If maximumwidth is specified, the result is the longest line of text that fits within maximumwidth. If maximumwidth is omitted, the result is the total width of the text.

Example

TEXTWIDTH(TheText)

Returns the total length of the text in the current shape.