Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-27-2023, 05:36 AM
davidvargas72 davidvargas72 is offline Find-and-Replace Special Characters Windows 10 Find-and-Replace Special Characters Office 2021
Novice
Find-and-Replace Special Characters
 
Join Date: Jan 2023
Posts: 6
davidvargas72 is on a distinguished road
Default Find-and-Replace Special Characters

Hello!
I'm having trouble with Find and Replace VBA macros:

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting


With Selection.Find
.Text = "%"
.Replacement.Text = " PERCENT"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAl
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "/"
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAl

It will find the charaters but will not replace them. Please help!
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Find-and-Replace Special Characters Find/Replace text longer than 255 characters alex100 Word VBA 5 07-08-2020 04:14 AM
Find-and-Replace Special Characters Combining Characters in Find & Replace Surge Word 6 03-10-2020 12:42 AM
Find-and-Replace Special Characters multiple find and replace in vba for special words kvnrao Word VBA 7 11-02-2018 06:28 PM
Find-and-Replace Special Characters Search and Replace special characters between word using wildcards mauuuuu5 Word 1 08-23-2015 09:20 PM
Find-and-Replace Special Characters Find and Replace some characters with Bullets kjxavier Word 1 01-02-2015 12:15 AM

Other Forums: Access Forums

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