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

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Aaron Babel - 12 Oct 2007 22:02 GMT
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
> Hi Aaron,
>
[quoted text clipped - 12 lines]
> do something
> endif
Jay Freedman - 13 Oct 2007 03:47 GMT
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 FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
>I'll try that suggestion, Helmut.
>
[quoted text clipped - 26 lines]
>> do something
>> endif