![]() |
#5
|
||||
|
||||
![]()
Hi George,
Try the following macro: Code:
Sub Demo() Application.ScreenUpdating = False With ActiveDocument.Range .InsertBefore vbCr .AutoFormat With .Find .ClearFormatting .Replacement.ClearFormatting .Text = "^13[!^13\-]{1,}" .Replacement.Text = "" .Forward = True .Wrap = wdFindStop .Format = False .MatchWildcards = True .Execute End With Do While .Find.Found With .Duplicate .Start = .Start + 1 .Font.Bold = True End With .Collapse wdCollapseEnd .Find.Execute Loop End With ActiveDocument.Paragraphs.First.Range.Delete Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] Last edited by macropod; 08-08-2012 at 04:48 PM. Reason: Code fix |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
iiiiifffff | Word VBA | 16 | 06-04-2016 01:47 AM |
Macro to find text in between two characters and then format selected text? | qcom | Word | 5 | 02-19-2015 11:23 PM |
Formatting macro | Ulodesk | Word Tables | 9 | 04-10-2012 06:37 PM |
Formatting Standard Deviations (Macro) | judicial85 | Excel Programming | 1 | 08-28-2011 05:28 PM |
![]() |
simpleonline1234 | Word VBA | 1 | 02-25-2011 02:28 AM |