How do I get Word.Pages?

V

vekaz

Hi,

I need to get text from all pages except page 1 from a word document. I
guess this can be achieved using Microsoft.Office.Interop.Word.Pages. I found
one way to get pages, but that way requires me to activate Word application:

Microsoft.Office.Interop.Word.Pages pages = doc.ActiveWindow.ActivePane.Pages;

Since I have to parse 2000 documents, I'd like to avoid opening Word for
each document. Is there any other way to populate pages?

Thanks in advance
 
C

Cindy M.

Hi =?Utf-8?B?dmVrYXo=?=,
I need to get text from all pages except page 1 from a word document. I
guess this can be achieved using Microsoft.Office.Interop.Word.Pages. I found
one way to get pages, but that way requires me to activate Word application:

Microsoft.Office.Interop.Word.Pages pages = doc.ActiveWindow.ActivePane.Pages;

Since I have to parse 2000 documents, I'd like to avoid opening Word for
each document. Is there any other way to populate pages?
If we're talking Word documents in the *.doc file format then there is no way
for you to read or write (it's not clear which you really mean) to the document
without opening the Word application. These files are an encoded, proprietary
format. It is possible to get the specification, but working with the BIFF is
different than using the object model (Interop.Word). There's a forum for
discussing the Office binary file formats:

http://social.msdn.microsoft.com/Forums/en-US/os_binaryfile/threads/

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

vekaz

Thank you for your reply, Cindy.

I realized using Word.Pages won't help me read the pages, but I found a
solution. Again, thanks for your reply.
 

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