![]() |
#3
|
|||
|
|||
![]() Code:
Sub ScratchMacro() 'A basic Word Macro coded by Gregory K. Maxey Dim oRng As Range Set oRng = ActiveDocument.Range With oRng.Find .ClearFormatting .Forward = True .Wrap = wdFindContinue .Format = True .MatchWildcards = True .Replacement.ClearFormatting 'Get rid of quotes .Text = "(" & Chr(34) & ")([A-Z][!^13]@)(" & Chr(34) & ")([^t:])" .Replacement.Text = "\2\4" .Execute Replace:=wdReplaceAll 'Bold terms .Text = "([A-Z][!^13]@[^t:])" .Replacement.Text = "\1" .Replacement.Font.Bold = True .Execute Replace:=wdReplaceAll End With lbl_Exit: Exit Sub End Sub |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bold Term Macro that DOES NOT bold terms with Quotation Marks | NotOriginal | Word VBA | 2 | 03-14-2024 02:22 PM |
Bold Header if it is not Bold (Check to see if it is Bold) | armendarizj | Word | 2 | 01-06-2022 05:45 PM |
![]() |
Burt | Word | 6 | 04-06-2019 09:09 AM |
![]() |
footer-assistance | Word | 1 | 06-29-2015 03:49 AM |
![]() |
Pluviophile | Word | 7 | 10-22-2013 10:29 AM |