Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-07-2022, 01:15 PM
mark99k's Avatar
mark99k mark99k is offline Bulk Removal of Paragraph Mark in Header Windows 10 Bulk Removal of Paragraph Mark in Header Office 2016
Novice
 
Join Date: Oct 2012
Location: California USA
Posts: 20
mark99k is on a distinguished road
Default

Having a macro create a selection in a header is iffy at best (and if you ever actually need it, a better way is ActiveWindow.View.SeekView). Here, though, you're better off replacing your entire second loop with just this:

Code:
For Each xHeader In xSec.Headers
    xHeader.Range.Find.Execute FindText:="^p^p^p", ReplaceWith:="^p^p", Replace:=wdReplaceAll
Next xHeader
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
a macro to replace paragraph mark with a space applies effect on paragraph marks after the selection drrr Word VBA 2 08-24-2021 03:05 AM
Bulk Removal of Paragraph Mark in Header What is this paragraph mark called booneyrex Word 8 03-04-2021 04:15 AM
Bulk Removal of Paragraph Mark in Header Indention below paragraph mark... kikola Word VBA 13 05-26-2020 06:21 AM
Bulk Removal of Paragraph Mark in Header Please help with header and footer removal pwangdel Word 3 11-03-2011 06:10 AM
Bulk Removal of Paragraph Mark in Header Final paragraph mark Caroline Word 2 02-22-2011 10:39 AM

Other Forums: Access Forums

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