| |
iges
Posts: 1
Score: 0
Joined: 12/21/2003
From:
Status: offline
|
Hi, I have a VBScript code posted below to get the content of MS Word doc,rtf files. The problem is when I count the words, characters (no spaces), characters (with spaces) the result does not match the MS Word Word Count called from the Tools menu. I figured this is beacuase of design elements (tables, images etc) that use special characters included in the content. Is there a way to get only pure plain text without special characters out of the word document or perhaps somehow to access the Word Count feature in Tools menu? regards, iges. Function ReadMSDocContent(pFullPath, pFilename) Dim objWord, docRange Set objWord = CreateObject("Word.Application") objWord.Visible = False objWord.Documents.Open(pFullPath) Set docRange = objWord.Documents(pFilename).Content ReadMSDocContent = docRange.Text objWord.Application.Quit True End Function
|
|