M
Misha
I have recorded a macro in Word 2003 which replaces 2
consecutive paragraph marks with one para mark, formatted
with 12pt spacing after. However, whenever I run the
macro, it puts a border round the text! Below is the text
of the macro. I don't know how to edit it to take the off
the border instruction (which I did not put there)Please
help.
ub SpacingAfter()
'
' SpacingAfter Macro
' Macro recorded Tuesday, 6 April 2004 by Ursula Ebert
'
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
Thanks Misha
consecutive paragraph marks with one para mark, formatted
with 12pt spacing after. However, whenever I run the
macro, it puts a border round the text! Below is the text
of the macro. I don't know how to edit it to take the off
the border instruction (which I did not put there)Please
help.
ub SpacingAfter()
'
' SpacingAfter Macro
' Macro recorded Tuesday, 6 April 2004 by Ursula Ebert
'
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
Thanks Misha