whiteSpace Property
Sets or returns a String that represents the whiteSpace attribute for inline HTML styles.
expression.whiteSpace
expression Required. An expression that returns one of the objects in the Applies To list.
Remarks
The String value for the whiteSpace property can be one of the following:
normal | Default. Lines of text break automatically. Content wraps to the next line if it exceeds the width of the object. |
nowrap | Line breaks are suppressed. Content does not wrap to the next line. |
pre | Line breaks and other white space are preserved. This possible value is supported in Internet Explorer 6 and later when the !DOCTYPE declaration specifies standards-compliant mode. When the !DOCTYPE declaration does not specify standards-compliant mode, you can retrieve this value, but it does not affect rendering |
Example
The following example sets the whiteSpace attribute for the body of the active document to not wrap text.
Sub SetWhiteSpaceToNoWrap()
ActiveDocument.body.Style.whiteSpace = "nowrap"
End Sub