#1
|
|||
|
|||
Recording macro for Find Wildcard
I have a Word document of labels. Each label looks like this:
Example Label: Quote:
1. use FIND 2. Tick USE WILDCARDS 2. Paste ?*. 3. Find In: Main Document Word highlights all the text before the "." character, and I can manually change the size to what I want. I figured I could make a button macro for this, so I clicked RECORD MACROS, performed all of the above, and then clicked STOP RECORDING. Problem is... when I click the macro button, literally nothing happens. I tried recording the same steps but adding one or two random actions afterwards, like pressing Enter or Space. The Macro recorded the random action, just not the Wildcard Find part. Here's the recorded macro from VBA: Code:
Sub Styles() ' ' Styles Macro ' ' Selection.Find.ClearFormatting With Selection.Find .Text = "?*." .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With Selection.Font.Size = 32 Selection.Find.ClearFormatting With Selection.Find .Text = "?*." .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With End Sub https://i.imgur.com/6xJn6sk.mp4 Please not that I'm absolutely not a power user. My only knowledge of VBA is clicking the "Record Macro" button. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wildcard to find any one or more words | Maksymromaniuk | Word | 1 | 11-02-2015 01:04 PM |
Need Help With Find and Replace Wildcard | rsrasc | Word VBA | 9 | 10-13-2015 02:37 PM |
Find/Replace Wildcard Needed | rsrasc | Word VBA | 4 | 11-11-2014 08:28 AM |
Wildcard Find and Replace | Ulodesk | Word | 1 | 06-23-2014 10:26 AM |
Need help using WildCard Find & Replace | Cayce | Word | 1 | 06-09-2014 04:17 PM |