Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-19-2013, 03:12 PM
macropod's Avatar
macropod macropod is offline Word VBA - Search a word and add/remove it Windows 7 64bit Word VBA - Search a word and add/remove it 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

Hi netchie,



In your initial post, you indicated that you're trying to process the contents of a table. In that case, all the code for processing storyranges is superfluous. Furthermore, even within whatever range contains the table, your code doesn't restrict itself to the table - it will happily change text outside it as well. As for problems like Restricted > Restrictedd, that's because you haven't told Word to match whole words only.

PS: When posting code, please use the code tags. They're on the 'Go Advanced' tab.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 03-19-2013, 03:32 PM
netchie netchie is offline Word VBA - Search a word and add/remove it Windows XP Word VBA - Search a word and add/remove it Office 2007
Novice
Word VBA - Search a word and add/remove it
 
Join Date: Jun 2011
Posts: 24
netchie is on a distinguished road
Default

Hi macropod

The problem that I am having is after generating a report, some of the words are not complete. So instead of going through them one by one, I am trying to create a macro to change them automatically but the problem is I don't know how to put each word and replace them. As you can see below, the one that I found is just changing one word. How and where can I insert on VBA another word to replace? or if there is a VBA where if I highlight the word and use the macro then it will be changed to the word I want?
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
search on multiple word documents Guy Roth Word 7 03-06-2017 01:31 PM
Word VBA - Search a word and add/remove it Word: Search and fill from Excel gbrucken Word 1 04-30-2012 10:40 AM
Word VBA - Search a word and add/remove it Remove numbering from Word Doc antaeusguy Word 1 03-14-2012 04:01 AM
Word VBA - Search a word and add/remove it search option in word 2007 anano Word 1 01-11-2012 09:03 AM
Search Problems in MS Word LoganB Word 0 09-03-2010 06:49 AM

Other Forums: Access Forums

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