The "new page" or "soft page break" event

A

Aaron Babel

Hello, everyone.
When content fills a page and passes the bottom page margin, a new page is
automatcially added (i.e., a "soft" page break). What is the event causing
this behavior? I would like to modify it to do more than add a page.

I'm using Word 2000 (on W2K) and Word 2003 (on XP).
 
H

Helmut Weber

Hi Aaron,
When content fills a page and passes the bottom page margin, a new page is
automatcially added (i.e., a "soft" page break). What is the event causing
this behavior? I would like to modify it to do more than add a page.

there is no "new-page" event.

You might check
the built-in document property "number of pages", like
pages1 = ActiveDocument.BuiltInDocumentProperties("number of pages")
do something
pages2 = ActiveDocument.BuiltInDocumentProperties("number of pages")
if pages2 > pages1 then
do something
endif


--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 
A

Aaron Babel

I'll try that suggestion, Helmut.

I wasn't sure if I was overlooking a "new page" event by another name; but
thought
there might not be one. You confirm this.

As I always find with this community, thanks for your speedy response.

I'll leave my post as "unanswered" to see if any other interesting
suggestions get added; but, yours seems dead on.

Take courage,
Aaron
 
J

Jay Freedman

Hi Aaron,

Helmut is correct, there is no "new page" event, at least not one
that's available to VBA.

The article http://www.word.mvps.org/FAQs/MacrosVBA/AppClassEvents.htm
lists the two (!) events that are available in Word 97 and the others
that are available in Word 2000 through 2003. Word 2007 has added
events concerned with the new content controls, building blocks, and
XML, but nothing for "new page".

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 

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