Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 10-21-2016, 02:09 PM
macropod's Avatar
macropod macropod is offline If statement for find and replacing certain text Windows 7 64bit If statement for find and replacing certain text Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

This might be made rather simpler and less error-prone if you said precisely where in the document these data occur. For example, while Greg's code will work for content located somewhere in the document body, the 'State of Florida' could be anywhere there and every instance of 'STATE TAX' would be replaced, yet it wouldn't work with anything in headers, footers, textboxes, etc.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Word - Find & Apply Styles to Specific Words - Using Case Statement jc491 Word VBA 17 12-26-2015 12:25 PM
Replacing the 2nd or 3rd instance of Text wdillon2 Word VBA 2 05-13-2015 10:21 PM
If statement for find and replacing certain text Problem replacing text. piritzo Word 2 06-22-2013 12:50 AM
If statement for find and replacing certain text Help with replacing text with wildcards sbatson5 Word 2 04-13-2012 03:49 AM
Replacing / editting text LisaC Word 0 02-25-2010 03:40 AM

Other Forums: Access Forums

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