Deleting unwanted page breaks

M

Mark

I amusing WORD 97, can anyone supply me with some code that will delete all
the page breaks in a document?

Thanks in advance
 
D

Dave Lett

Hi Mark,

You can use something like the following:

With Selection
.HomeKey Unit:=wdStory
With .Find
.ClearFormatting
.Text = "^m"
With .Replacement
.ClearFormatting
.Text = ""
End With
.Execute Replace:=wdReplaceAll
End With
End With

HTH,
Dave
 
Top