How to retrieve information in each page of Word document

Z

Zhaohui Xing

In my current C++ Word Automation/Import project, I need retrieve each
physical WORD page information so as to process them. How can access or get
the objects/information in each Word phusical page?
Thanks in advance!

Zhaohui
 
C

Cindy M -WordMVP-

Hi Zhaohui,
In my current C++ Word Automation/Import project, I need retrieve each
physical WORD page information so as to process them. How can access or get
the objects/information in each Word phusical page?
word provides nothing in the object model that will allow you to do this
directly. Only old technology exists, which means you have to physically move
the cursor to each page (GoTo method, for example). Then
Word.Range rng = doc.Bookmarks("\Page").Range

This range contains the content of the current page

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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 :)
 
Z

Zhaohui Xing

Hi Cindy,

Thank you for your great tips.
I am not very clear about the means of doc.Bookmarks("\Page"), how about
iterating page to page in the document?
Do you have any example code (VBA or any language) or URL about this topic,
sample code would be great.

BTW, your comment is really helpful to me.

Zhaohui
 

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