![]() |
|
#2
|
||||
|
||||
|
A Find/Replace can't change case that way - a macro would be needed, such as:
Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument.Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "\[*\]"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchWildcards = True
.Execute
End With
Do While .Find.Found
.Case = wdTitleSentence
.Characters(2) = UCase(.Characters(2))
.Collapse wdCollapseEnd
.Find.Execute
Loop
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
| Tags |
| format style, sentence case, wildcards |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using wildcards how do I Find and Add to, not replace | Stargehzer | Word | 3 | 01-25-2016 09:14 PM |
Find/replace font colour in all header/footer
|
trillium | Word VBA | 4 | 10-20-2015 10:39 PM |
| Find & Replace: Wildcards (except this pattern) | tinfanide | Word | 6 | 01-26-2014 06:39 AM |
Find and replace with a macro, problem with letter case
|
garcanrya | Word VBA | 2 | 01-10-2014 05:40 AM |
| wildcards in find & replace to reverse word order | jeffk | Word | 3 | 11-11-2012 01:47 PM |