KeepLinesTogether Property
Sets or returns an msoTriState that represents whether or not all lines in the specified paragraph will remain in the same text box. Read/write.
msoCTrue |
msoFalse All lines will remain in the same text box. |
msoTriStateMixed |
msoTriStateToggle |
msoTrue All lines may not remain in the same text box. |
expression.KeepLinesTogether
expression Required. An expression that returns a ParagraphFormat object.
Remarks
This option ensures that there is not a text frame or column break between the lines of the specified paragraph. If the paragraphs are too large for the text frame or column, the first line will start at the top of the next text frame or column.
The default setting for this property is msoFalse.
Example
This example sets the KeepLinesTogether property to msoTrue for the specified ParagraphFormat object.
Dim objParaForm As ParagraphFormat
Set objParaForm = ActiveDocument.Pages(1).Shapes(1) _
.TextFrame.TextRange.Paragraphs(1).ParagraphFormat
objParaForm.KeepLinesTogether = msoTrue