View Single Post
  #2   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

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 :-)