Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Get the page count
Hi,
I've an ASP.NET web application on which I need to get the word doc page count. Since I have many word documents to get the page count, I don't want to use Word Application object as it will consume a lot of resources on the server. Is there a possibility to get the page count by reading the word doc into a stream & by looking for page delimiters? Or is there a better way to get the page count without using word applications objects. Please help.....! |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Get the page count
On Sun, 4 May 2008 23:44:02 -0700, Mihidum
wrote: Hi, I've an ASP.NET web application on which I need to get the word doc page count. Since I have many word documents to get the page count, I don't want to use Word Application object as it will consume a lot of resources on the server. Is there a possibility to get the page count by reading the word doc into a stream & by looking for page delimiters? Or is there a better way to get the page count without using word applications objects. Please help.....! You can use DSOFile.dll (version 2) to read document properties, including page count, from an Office 97-2003 format document without opening the document. It doesn't work with Office 2007 format documents, but you may be able to get something out of the XML in that container. See http://www.word.mvps.org/FAQs/MacrosVBA/DSOFile.htm. Also be aware that the page count of a Word document depends on the printer driver used to do the layout (http://www.word.mvps.org/FAQs/Format...extReflow.htm), so what you get from DSOFile is only an approximation. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Get the page count
"Jay Freedman" wrote: On Sun, 4 May 2008 23:44:02 -0700, Mihidum wrote: Hi, I've an ASP.NET web application on which I need to get the word doc page count. Since I have many word documents to get the page count, I don't want to use Word Application object as it will consume a lot of resources on the server. Is there a possibility to get the page count by reading the word doc into a stream & by looking for page delimiters? Or is there a better way to get the page count without using word applications objects. Please help.....! You can use DSOFile.dll (version 2) to read document properties, including page count, from an Office 97-2003 format document without opening the document. It doesn't work with Office 2007 format documents, but you may be able to get something out of the XML in that container. See http://www.word.mvps.org/FAQs/MacrosVBA/DSOFile.htm. Also be aware that the page count of a Word document depends on the printer driver used to do the layout (http://www.word.mvps.org/FAQs/Format...extReflow.htm), so what you get from DSOFile is only an approximation. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. Thanks a lot Jay. You saved my day |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem with page count | Microsoft Word Help | |||
Word's word count feature should be able to count sentences also | Microsoft Word Help | |||
A word count that appears next to the page count | Microsoft Word Help | |||
Print page word count on every page | Page Layout | |||
Change Line Count to not count blank lines | Microsoft Word Help |