Page Count Changed Event in Word?

  • Thread starter Scott Bellware [C# MVP]
  • Start date
S

Scott Bellware [C# MVP]

Greetings,

Is there an event that is raised when the number of pages in a word doc
changes? If not, is there some other way to react to the change in page
count, perhaps an event on a Pages collection, perhaps using a timer?

Thanks,
Scott
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?U2NvdHQgQmVsbHdhcmUgW0MjIE1WUF0=?=,
Is there an event that is raised when the number of pages in a word doc
changes? If not, is there some other way to react to the change in page
count, perhaps an event on a Pages collection, perhaps using a timer?
No, and no. Unfortunately. Using a timer you could, however, check the page
count (there's just no collection). See the documentation on the
INFORMATION property of the range/selection objects. That has an argument
that returns the total number of pages.

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

Scott Bellware [C# MVP]

Thanks for the reply, Cindy!

Wow. What a let down. I have a hard time imagining how an object model
supporting document creation got through acceptance testing without a model
representation of what would seem to be a canonical part of the doman, i.e.:
a Page object, and a collection of `em that in aggregate composes a document.
Seems like the API could do with a little domain-driven OO-ness :)

Cheers,
Scott
 
C

Cindy M -WordMVP-

Hi Scott,
I have a hard time imagining how an object model
supporting document creation got through acceptance testing without a model
representation of what would seem to be a canonical part of the doman, i.e.:
a Page object, and a collection of `em that in aggregate composes a document.
Seems like the API could do with a little domain-driven OO-ness :)
It's been on the Word MVP "wish list" for years, now... I don't know if it's due
to the way Word works (dynamic text flow: a "page" isn't a "thing", it's the
result of a combination of things, always in flux). Or just because old
WordBasic didn't have an equivalent.

Anyway, if you have a conduit for submitting suggestions, please use it :)

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

Scott Bellware [C# MVP]

Thanks, Cindy! I doubt I'd have a better conduit than you might... all my
connections are in the developer tools area. I do have one email address
that goes to the VSTO team. I'll post the suggestion.

Cheers!
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?U2NvdHQgQmVsbHdhcmUgW0MjIE1WUF0=?=,
I doubt I'd have a better conduit than you might... all my
connections are in the developer tools area. I do have one email address
that goes to the VSTO team.
In my experience, it's also a question of "statistics": the more requests,
the higher priority a suggestion gets :)

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