Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted
I added the Microsoft Word 10.0 Object Library, I'm 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.
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...