BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How do you get Total pages from MSWord?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Kenneth R. Lewis
Guest





PostPosted: Fri Jun 27, 2003 8:37 pm    Post subject: How do you get Total pages from MSWord? Reply with quote



Hello all,

Anyone know how to get the total pages for a word document?

Thanks,

Kenneth


Back to top
Eddie Shipman
Guest





PostPosted: Fri Jun 27, 2003 9:13 pm    Post subject: Re: How do you get Total pages from MSWord? Reply with quote



In article <3efcaaa5$1 (AT) newsgroups (DOT) borland.com>, [email]kenneth_lewis (AT) intuit (DOT) com[/email]
says...
Quote:
Hello all,

Anyone know how to get the total pages for a word document?


Try using the Information property of the Range in this manner:
{found in the MS Word VB Help file}

WordDocument1.Range.Information(wdActiveEndPageNumber);

wdActiveEndPageNumber Returns the number of the page that contains the active
end of the specified selection or range, counting from the beginning of the
document. Any manual adjustments to page numbering are disregarded (unlike
wdActiveEndAdjustedPageNumber).

To get the number of pages in the dosument that contains the Range use this
flag:

wdNumberOfPagesInDocument Returns the number of pages in the document
associated with the selection or range.



Back to top
Eddie Shipman
Guest





PostPosted: Mon Jun 30, 2003 8:29 pm    Post subject: Re: How do you get Total pages from MSWord? Reply with quote



In article <3f00885a$1 (AT) newsgroups (DOT) borland.com>, [email]kenneth_lewis (AT) intuit (DOT) com[/email]
says...
Quote:
Thanks, I found an example on the web using the Information on the
Selection. Is it better to use the Range or Selection?

??? Don't know.


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.