Link to home
Start Free TrialLog in
Avatar of Subrojit
SubrojitFlag for United States of America

asked on

ASP Code Needed for counting numbers of pages in MS-Word file and no. of words in the document.

Hi All,

  I m in urgent need of a asp code for counting the total no. of  pages in a word file, and the word count.

I am trying this code -

Dim objWord
Dim objDoc
Set objWord = Server.CreateObject ("Word.Application")
Set objDoc = objWord.Documents.Open (Server.MapPath(("c:\WordABC.doc")))
wc = objWord.Documents.wordcount

response.write objDoc.readall
response.end
objDoc.Save
Set oWDoc = Nothing
Set oWord = Nothing

But getting following error -
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed

  Please help.
ASKER CERTIFIED SOLUTION
Avatar of TDSnet
TDSnet

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial