From: LA Lawyer on
I have a multi-line text variable (an address) that Word 2007 routinely
splits between pages. How do I use VBA to instruct Word to keep those lines
together?


From: Doug Robbins - Word MVP on
If each line of the address is in a separate paragraph, format all but the
last paragraph so that it is kept with next

Assuming that you can set a Range (rngAddress) to the address, use

For i = 1 to rngAddress.Paragraphs.Count - 1
rngAddress.Paragraphs(i).KeepWithNext = True
Next i

If it is all in one paragraph, then use

rngAddress.Paragraphs(1).KeepTogether = True


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"LA Lawyer" <hkapp(a)kapplaw.com> wrote in message
news:ulKnMub0KHA.752(a)TK2MSFTNGP04.phx.gbl...
> I have a multi-line text variable (an address) that Word 2007 routinely
> splits between pages. How do I use VBA to instruct Word to keep those
> lines together?
>