![]() |
#5
|
||||
|
||||
![]()
Firstly, there is a commonality there so you could search for "E:^t"
Secondly, you can replace formatting with a find but if you do, the actual text replacement doesn't happen at the same time. So I would do it with a pair of replacements - first just doing the formatting change, second doing the text change. Code:
Sub CleanUp() Dim oRng As Word.Range Set oRng = ActiveDocument.Range With oRng.Find .ClearFormatting .Replacement.ClearFormatting .MatchCase = True .Text = "E:^t" .Replacement.ParagraphFormat.LeftIndent = InchesToPoints(0) .Execute Replace:=wdReplaceAll .Replacement.ClearFormatting .Replacement.Text = "E: " .Execute Replace:=wdReplaceAll End With End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Johanna | Word | 3 | 11-22-2019 01:06 AM |
![]() |
Pauliina | Word | 4 | 05-24-2018 10:01 PM |
![]() |
dita | Word VBA | 7 | 05-06-2018 12:47 AM |
![]() |
DavidL | Word VBA | 7 | 04-04-2018 12:01 AM |
![]() |
Dave T | Word VBA | 2 | 07-16-2015 11:23 PM |