View Single Post
 
Old 09-30-2015, 02:39 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

The 'Keep with Next' attribute should be managed by whatever paragraph Style you use for the text on the grey lines. Although the code I posted uses Word's Normal Style, that isn't fixed in concrete - you could use any other suitable Style that has all the font, alignment & other attributes you want. That said:
.Range.ParagraphFormat.KeepWithNext = True
works for me when inserted after:
.Range.Style = wdStyleNormal
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote