Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 11-13-2023, 01:56 AM
gmayor's Avatar
gmayor gmayor is offline Format paragraphs between Start and End Windows 10 Format paragraphs between Start and End Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,138
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

Define the range, then format the range e.g.
Code:
Sub StartEnd()
'Format paragraphs between Start and End
Dim oRng As Range
  Set oRng = ActiveDocument.Range
    oRng.Start = ActiveDocument.Range.Paragraphs(3).Range.Start
    oRng.End = ActiveDocument.Range.End
    oRng.Style = "MyStyle"
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
Lock Format Changed Paragraphs From Style Modifications EdA SRQ Word 3 03-12-2022 09:35 PM
Format paragraphs between Start and End How to duplicate paragraphs & format them effimera Word VBA 2 12-20-2021 04:40 AM
Format paragraphs between Start and End Format multiple paragraphs differently Dave T Word VBA 7 07-31-2019 08:12 PM
Changing the format/style for numbered paragraphs AND MAKING THEM STICK! FearlessStamper Word 2 10-30-2017 02:17 PM
Format paragraphs between Start and End VBA to set format for paragraphs that meet with specific requirements AustinBrister Word VBA 3 06-01-2015 07:00 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:28 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