Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Aaron Babel - 12 Oct 2007 21:34 GMT
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).
Helmut Weber - 12 Oct 2007 21:45 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.