G
Guest
I have recorded a macro in Word 2003 which removes two consecutive paragraph
marks and replaces them with one paragraph mark formatted with 12 pt sapcing
afte. This works fine, but it also puts a border round the text, which I did
not actually specify.
However, when I looked at the macro, this is what I found:
Sub InsertSpacingAfter()
'
' InsertSpacingAfter Macro
' Replaces consecutive paras with 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 = wdFindAsk
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
I am not au fait with VB, so how do I edit the macro so that it will not put
in the border, I tried just deleting 'Borders.Shadow, but it did not work.
Thank you,
marks and replaces them with one paragraph mark formatted with 12 pt sapcing
afte. This works fine, but it also puts a border round the text, which I did
not actually specify.
However, when I looked at the macro, this is what I found:
Sub InsertSpacingAfter()
'
' InsertSpacingAfter Macro
' Replaces consecutive paras with 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 = wdFindAsk
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
I am not au fait with VB, so how do I edit the macro so that it will not put
in the border, I tried just deleting 'Borders.Shadow, but it did not work.
Thank you,