Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-01-2018, 01:41 PM
kvnrao kvnrao is offline multiple find and replace in vba for special words Windows 10 multiple find and replace in vba for special words Office 2016
Novice
multiple find and replace in vba for special words
 
Join Date: Nov 2018
Posts: 4
kvnrao is on a distinguished road
Default multiple find and replace in vba for special words

I have the following vba macro in msoffice word, where individual programs are written for each special word. How to write a combined and comprehensive program.
Sub Macro1()


'
' Macro1 Macro
'
'
Selection.HomeKey

With Selection.Find
.Text = ChrW(257)
.Replacement.Text = "A"
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute Replace:=wdReplaceAll

' Selection.HomeKey
With Selection.Find
.Text = ChrW(275)
.Replacement.Text = "E"
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute Replace:=wdReplaceAll

With Selection.Find
.Text = ChrW(299)
.Replacement.Text = "I"
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute Replace:=wdReplaceAll

With Selection.Find
.Text = ChrW(333)
.Replacement.Text = "O"
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = ChrW(363)
.Replacement.Text = "U"
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute Replace:=wdReplaceAll

End Sub
Reply With Quote
 

Tags
find and replace, vba in microsoft word, vba in word

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple find and replace in vba for special words VBA Find&Replace all bold, itlaic, underlined and highlighted words/characters Kalü Word VBA 22 04-24-2018 05:35 AM
multiple find and replace in vba for special words Find and replace mutiple spaces between lowercase words only Dave T Word VBA 2 07-16-2015 11:23 PM
multiple find and replace in vba for special words how to replace to words with multiple formats cdk270 Word 1 07-16-2015 01:56 AM
multiple find and replace in vba for special words Highlight and then replace multiple words redhin Word VBA 5 03-05-2013 05:42 AM
multiple find and replace in vba for special words Find & Replace: substitute red-coloured words with underscores tinfanide Word 2 10-06-2012 11:04 PM

Other Forums: Access Forums

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