Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-13-2023, 01:27 AM
RobiNew RobiNew is offline Format paragraphs between Start and End Windows 10 Format paragraphs between Start and End Office 2016
Competent Performer
Format paragraphs between Start and End
 
Join Date: Sep 2023
Posts: 208
RobiNew is on a distinguished road
Default Format paragraphs between Start and End


I'm trying to format paragraphs between Start and End, but my code fails. Can someone help? Thanks!
Code:
Sub StartEnd()
'Format paragraphs between Start and End
   Dim oRng As Range
  Set oRng = ActiveDocument.Range(Start:=64, End:=ActiveDocument.Paragraphs.Count)
    With oRng.Paragraphs
    For Each oPar In oRng.Paragraphs
              oPar.Style = "MyStyle"
    Next oPar
    End With
End Sub
Reply With Quote
 

Thread Tools
Display Modes


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:03 AM.


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