![]() |
#2
|
||||
|
||||
![]()
Without seeing the document, the following should do that. It searches for manual page breaks and adds the built-in Title paragraph style to the line following the page break. You can format that style however you wish:
Code:
Sub Macro1() Dim orng As Range Set orng = ActiveDocument.Range orng.Paragraphs(1).Range.Style = "Title" With orng.Find Do While .Execute(findText:="^m") orng.Collapse 0 orng.Next.Paragraphs(1).Style = "Title" Loop End With End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
betsyg | Word | 4 | 06-13-2019 02:18 PM |
![]() |
sponge | Word | 3 | 09-14-2017 12:11 PM |
![]() |
jrasicmark | Word | 3 | 06-02-2014 11:28 PM |
Keep with Next/Keep Lines Together (to adjust page breaks) | lewiskm55 | Word | 1 | 05-02-2011 08:18 AM |
Deleted Section Breaks Changes Page Breaks | Brantnshellie | Word | 0 | 02-01-2009 09:22 PM |