Hi, everyone.
I'm trying to create a macro in Word that will quickly find/replace instances in documents where certain characters followed by a tab are always followed by a capital letter.
For instance:
Q (tab) hello
A (tab) goodbye
Would always be changed to
Q (tab) Hello
A (tab) Goodbye
I tried (silly me) using the Find/Replace tab designator of ^t in a trial macro, but then realized I probably needed to use vbtab in some fashion, but can't seem to get the syntax right.
So far I've gotten
But that is not working at all, haha. I'm not sure how to only select Q and A as the character preceding a tab, and how to continue the syntax to include any lowercase character after the tab.With ActiveDocument.Range.Find .ClearFormatting With .Replacement.Font .SmallCaps = False .AllCaps = True End With .MatchWildcards = True .Text = "Q" &vbtab "([a-z])" .Replacement.Text = "Q" &vbtab "\1" .Execute Replace:=wdReplaceAll End With