WordWrap Property

Microsoft Word Visual Basic

Show All

WordWrap Property

       

WordWrap property as it applies to the Cell object.

True if Microsoft Word wraps text to multiple lines and lengthens the cell so that the cell width remains the same. Read/write Boolean.

expression.WordWrap

expression   Required. An expression that returns a Cell object.

WordWrap property as it applies to the Paragraph, ParagraphFormat, Paragraphs, and TextFrame objects.

True if Microsoft Word wraps Latin text in the middle of a word in the specified paragraphs or text frames. This property returns wdUndefined if it’s set to True for only some of the specified paragraphs or text frames. Read/write Long. This usage may not be available to you, depending on the language support (U.S. English, for example) that you’ve selected or installed.

expression.WordWrap

expression   Required. An expression that returns one of the above objects.

Example

As it applies to the Cell object.

This example sets Microsoft Word to wrap text to multiple lines in the third cell of the first table so that the cell's width remains the same.

ActiveDocument.Tables(1).Range.Cells(3).WordWrap = True

As it applies to the Paragraph, ParagraphFormat, Paragraphs, and TextFrame objects.

This example sets Microsoft Word to wrap Latin text in the middle of a word in the first paragraph of the active document.

ActiveDocument.Paragraphs(1).WordWrap = True