how to remove form feed chars?

T

Tieu

Hi,

There are page break/form feed chars (shape of a SQUARE) in a Word Document.
Can I remove them automatically using VBA? Also, how can I delete an entire
page using macro. Thanks in advance.
 
C

Cindy M -WordMVP-

Hi Tieu,
There are page break/form feed chars (shape of a SQUARE) in a Word Document.
Can I remove them automatically using VBA? Also, how can I delete an entire
page using macro.
Can you explain where these characters may have come from? Are you able to
select one and delete it? (IOW, is your problem primarily getting rid of a
whole bunch of them, or are you literally unable to delete them?)

A macro to delete a page (off the top of my head, so there may be small typos
or syntax errors):

Sub DeletePage()
'Make sure the cursor is on the page
'then run the macro
ActiveDocument.Bookmarks("\page").Range.Select
Selection.Delete
End Sub

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top