Hi Chayes
Thanks for the feedback. I have modified the code to take into account the formatting/line spacing issues you are experiencing. Replace the code I gave you yesterday with this one and it should resolve your issues:
Sub Macro1()
'
' Macro1 Macro
'
'
Selection.HomeKey Unit:=wdStory
pCount = ActiveDocument.Paragraphs.Count
For Count = 1 To pCount
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([A-Z]{1,2})([0-9]{1,2})"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeParagraph
Selection.MoveDown Unit:=wdLine, Count:=1
Next Count
Selection.WholeStory
With Selection.ParagraphFormat
.SpaceBefore = 0
.SpaceAfter = 0
End With
Selection.HomeKey Unit:=wdStory
End Sub
Good luck.
Tony
|