Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 10-22-2014, 01:45 AM
macropod's Avatar
macropod macropod is offline VBA find keyword and move to location then add symbol Windows 7 64bit VBA find keyword and move to location then add symbol Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,471
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

You could, for example, use a wildcard Find/Replace, using:
Code:
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = StrTxt & "[,. ]@<*>[,. ]@<*>[,. ]@<*>[,. ]@<*>[,. ]@"
    .Replacement.Text = "^&" & Chr(123)
    .Forward = True
    .Wrap = wdFindcontue
    .Format = False
    .MatchWildcards = True
    .Execute Replace:=wdReplaceAll
  End With
where StrTxt is the word to find and Chr(123) is the symbol you want to add.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA find keyword and move to location then add symbol how to find and replace a symbol with another symbol wondermuse Word 5 10-09-2014 06:30 AM
VBA find keyword and move to location then add symbol Move shape to bookmark location Byron Polk Word VBA 4 08-07-2014 03:21 AM
VBA find keyword and move to location then add symbol How to either move document display to right or left; or reduce size of find/replace window. pmstock Word 2 08-02-2014 08:34 PM
VBA find keyword and move to location then add symbol Find keyword in section & delete section donaldadams1951 Word VBA 5 12-03-2013 10:08 AM
Move pst location? markg2 Outlook 0 06-29-2013 11:00 AM

Other Forums: Access Forums

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