Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #12  
Old 09-23-2014, 04:40 AM
macropod's Avatar
macropod macropod is offline Created VBA to Find and Replace in Body, Header and Footer with Highlighting the replacement text Windows 7 64bit Created VBA to Find and Replace in Body, Header and Footer with Highlighting the replacement text Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,516
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I believe the only thing you'd need to change is from:
strFile = Dir(StrFolder & "*.docx")
to:
strFile = Dir(StrFolder & "*.dotx")
However, given that templates in Word 2007 & later are often macro-enabled, you might do better to use:
strFile = Dir(StrFolder & "*.dot")
This will open .dotx, .dotm and .dot templates.

PS: Please don't quote previous posts in your replies unless there's something specific you need to refer to - and then include only the relevant portion(s). Anything more just adds clutter.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
find & replace, header; footer; body, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Created VBA to Find and Replace in Body, Header and Footer with Highlighting the replacement text Find & Replace in Header/Footer in 1000 files amodiammmuneerk@glenmarkp Word 12 03-05-2018 03:31 AM
Created VBA to Find and Replace in Body, Header and Footer with Highlighting the replacement text Find & Replace in Header/Footer PReinie Word 6 01-22-2014 06:45 PM
Footer Find & Replace Operation? binar Word 1 02-05-2013 10:39 PM
Created VBA to Find and Replace in Body, Header and Footer with Highlighting the replacement text Insert a header name in the text (body) bal-007 Word 3 11-25-2011 01:08 PM
Find and replace page numbers in body of text tollanarama Word 3 02-13-2011 06:00 AM

Other Forums: Access Forums

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