#1
|
|||
|
|||
Find and replace with a macro, problem with letter case
Hello,
hope you can help me. I'm trying to tidy some xml-code with Word macros (find and replace) - don't ask me why I have to do it with Word. ;-) For some reason the replacement text starts with a capital letter. Can you tell me what's wrong with my vba? Code:
Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "AgeElement" .Replacement.Text = "age" .Forward = True .Forward = True .Wrap = wdFindContinue .Format = False End With Selection.Find.Execute Replace:=wdReplaceAll Thank you very much! -garcanrya |
#2
|
||||
|
||||
Try adding:
.MatchCase = True
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thanks, macropod, this helped!
greetings, garcanrya |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is the following too complex for find/replace macro? | bertietheblue | Word VBA | 12 | 11-04-2013 05:35 PM |
Find - Replace Macro using a table list | mdw | Word | 0 | 08-01-2013 04:36 PM |
Find and Replace Format macro issue | Jack | Word VBA | 2 | 12-12-2012 09:24 PM |
macro or find/replace | JamesVenhaus | Word | 2 | 02-27-2012 03:34 PM |
Find and Replace Macro - A Better Way | Tribos | Word VBA | 0 | 10-08-2008 03:22 AM |