G
gaubahn via OfficeKB.com
Hi Guys,
I have output documents that have extra blank line spaces that have a size of
2pt. I am trying to create a macro that should delete all instances of this
2pt size line spaces. However my macro below only works to some extent, when
a document have two blank lines that are both in size 2, it only deletes 1
blank space. If i run the macro again it still does not remove the the
remaining blank line space.
Sub Delete2ptLineSpace()
With ActiveDocument.Content.Find
.ClearFormatting
.Replacement.ClearFormatting
With .Font
.Size = 2
End With
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute Replace:=wdReplaceAll
End With
End Sub
i would greatly appreciate any assistance regarding this.
Thanks and regards,
gaubahn
I have output documents that have extra blank line spaces that have a size of
2pt. I am trying to create a macro that should delete all instances of this
2pt size line spaces. However my macro below only works to some extent, when
a document have two blank lines that are both in size 2, it only deletes 1
blank space. If i run the macro again it still does not remove the the
remaining blank line space.
Sub Delete2ptLineSpace()
With ActiveDocument.Content.Find
.ClearFormatting
.Replacement.ClearFormatting
With .Font
.Size = 2
End With
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute Replace:=wdReplaceAll
End With
End Sub
i would greatly appreciate any assistance regarding this.
Thanks and regards,
gaubahn