Hi all,
I'm trying to read a word document for the purpose of obtaining a word count, I realise Word has built in functionality for presenting a word count but I want to write a little app that will omit certain parts of the document from the word count.
So far I have tried this code to open the document but I am getting an error 'Word.Document cannot be found' and 'Microsoft.Office.Interop cannot be found'. I have added a reference to the Microsoft Office 12.0 Object Library under the COM tab. I have Office 2007 installed and I'm using VB2005.
Any ideas?Code:Imports Microsoft.Office.Interop Dim appWord As New Microsoft.Office.Core.Application Dim docWord As New Word.Document docWord = appWord.Documents.Open("c:\test.doc")




Reply With Quote