VB .net and Word 97

getpfsi

New member
Joined
Nov 5, 2003
Messages
4
Hi,

I have a piece that works perfectly on Word 2002, but cannot even open a document in word 97 for whatever reason. The code is done in VB .net.

I started with:
Dim WordObject as Word.Application
Dim WordDoc as Word.Document
WordObject = CreateObject("Word.Application")
WordObject.Visible = True

After this, I tried to open a document using add and open, but neither could open a document. Everytime it ran the code, it gave the error "object reference not set to an instance of an object".

any ideas about what the problem is?
Thanks
 
I added the Microsoft Word 10.0 Object Library, Im not sure if Word 97 is not compliant with that or what the issue is. I found an article that said the application variable should be declared as Word.ApplicationClass and document variable shuold be declared as Word.DocumentClass for Word 97. I did that, but still got the same error.
 
Back
Top