Accessing Number of pages in a given section

D

David Robinson

Hi

I am trying in VB to access the number of pages in Section(i) of a document
where the document has n sections and 0<i<=n.

I am trying to find an expression in the form

npages = vb expression

It ought to be easy, but so far I have failed!!

David Robinson
 
S

Stefan Blom

I believe the ComputeStatistics method is the closest you can get. I don't know
how reliable it is for calculating page numbers for less than a whole document,
though.

A possible alternative includes calculating the number of pages in a section
using the SECTIONPAGES field and then store the value in a variable via a SET
field.

However, since most people have moved on to the Answers and MSDN forums, you may
want to repost there; for example, you could try the programming forum at
Answers (http://answers.microsoft.com/en-us/office/forum/customize?tab=all) or
or the Word Developer forum at MSDN
(http://social.msdn.microsoft.com/Forums/en-US/worddev/threads).

--
Stefan Blom
Microsoft Word MVP




"David Robinson" wrote in message

Hi

I am trying in VB to access the number of pages in Section(i) of a document
where the document has n sections and 0<i<=n.

I am trying to find an expression in the form

npages = vb expression

It ought to be easy, but so far I have failed!!

David Robinson
 

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