G
Guest
I have recorded a macro to find two consecutive paragraph marks and replace
them with one paragraph mark, formatted with 12pt spacing after. THis works,
but also puts a border round the text. I do not really understand Visual
Basic, and therefore cannot edit the macro. Could someone please help? Below
is the macro:
Sub RemoveTwooParaMarks()
'
' RemoveTwooParaMarks Macro
' Remove 2 para marks replace with one para mark format 12 pt spacing after
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.ParagraphFormat
.SpaceBeforeAuto = False
.SpaceAfter = 12
.SpaceAfterAuto = False
.LineUnitAfter = 0
End With
Selection.Find.Replacement.ParagraphFormat.Borders.Shadow = False
With Selection.Find
.Text = "^p^p"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
them with one paragraph mark, formatted with 12pt spacing after. THis works,
but also puts a border round the text. I do not really understand Visual
Basic, and therefore cannot edit the macro. Could someone please help? Below
is the macro:
Sub RemoveTwooParaMarks()
'
' RemoveTwooParaMarks Macro
' Remove 2 para marks replace with one para mark format 12 pt spacing after
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.ParagraphFormat
.SpaceBeforeAuto = False
.SpaceAfter = 12
.SpaceAfterAuto = False
.LineUnitAfter = 0
End With
Selection.Find.Replacement.ParagraphFormat.Borders.Shadow = False
With Selection.Find
.Text = "^p^p"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub