Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-09-2022, 10:57 PM
gmayor's Avatar
gmayor gmayor is offline Making all lines following page breaks a particular style Windows 10 Making all lines following page breaks a particular style Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Making all lines following page breaks a particular style Two-line heading in TOC is making two lines of dot leaders betsyg Word 4 06-13-2019 02:18 PM
Making all lines following page breaks a particular style Avoid continous breaks turn into page breaks sponge Word 3 09-14-2017 12:11 PM
Making all lines following page breaks a particular style Hidden page breaks and section breaks 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

Other Forums: Access Forums

All times are GMT -7. The time now is 12:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft