Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 05-05-2014, 09:14 AM
konopca konopca is offline Multi-Doc Find/Replace, Including Headers/Footers & Textboxes Windows XP Multi-Doc Find/Replace, Including Headers/Footers & Textboxes Office 2010 64bit
Novice
Multi-Doc Find/Replace, Including Headers/Footers & Textboxes
 
Join Date: Apr 2011
Posts: 27
konopca is on a distinguished road
Default

Paul
I removed the x from this line. Is that okay? I have Word 2010 but I open all my files in compatiability mode.
strFile = Dir(strFolder & "\*.doc", vbNormal)

And when I recorded a macro for search and replace I got the following code but I'm not sure how much of it to incorporate. I also need:

1) All the headers to be changed
2) All the occurrences in the text layer, and
3) All the text boxes (which are not in the header)

Code:
 
Sub test()
'
' test Macro
'
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "04-15-09"
.Replacement.Text = "05-05-14"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub

Thanks for your help.
Carol
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi-Doc Find/Replace, Including Headers/Footers & Textboxes headers/footers scot Word 3 05-22-2015 09:45 AM
Macro for find/replace (including headers and footers) for multiple documents jpb103 Word VBA 2 05-16-2014 04:59 AM
Multi-Doc Find/Replace, Including Headers/Footers & Textboxes Odd and Even Headers/Footers sarineochaos Word 1 02-04-2014 06:15 PM
Multi-Doc Find/Replace, Including Headers/Footers & Textboxes Replace text of textboxes tng Word VBA 1 12-22-2013 05:23 PM
Multi-Doc Find/Replace, Including Headers/Footers & Textboxes Headers and Footers teza2k06 Word 1 05-14-2013 11:07 AM

Other Forums: Access Forums

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