![]() |
#4
|
||||
|
||||
![]()
Another way:
Code:
Sub Demo() Application.ScreenUpdating = False With ActiveDocument.Range .InsertBefore " " With .Find .ClearFormatting .Replacement.ClearFormatting .Forward = True .Wrap = wdFindContinue .Format = False .MatchWildcards = True .Text = ".([0-9]{1,3}.)" .Replacement.Text = ". \1" .Execute Replace:=wdReplaceAll .Text = " ([a-e].)" .Replacement.Text = "^p\1" .Execute Replace:=wdReplaceAll .Replacement.Style = "Strong" .Text = " ([0-9]{1,3}.)" .Execute Replace:=wdReplaceAll End With .Characters.First.Delete End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] Last edited by macropod; 03-28-2014 at 01:10 PM. Reason: Additional code for malformed question spacing |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Sammie0Sue | PowerPoint | 1 | 12-06-2013 05:51 AM |
![]() |
suerose | Word | 2 | 07-04-2011 07:59 PM |
![]() |
shabbaranks | Word | 3 | 05-18-2011 08:59 AM |
Creating a MACRO | Nikb3522 | Word VBA | 0 | 10-21-2010 05:55 PM |
creating macro | steveb | Word VBA | 0 | 08-14-2010 01:29 AM |