QueryInterface for interface Word._Application failed.

L

Lee O'Brien

Hi, does anyone have any experience with this error?

I had a asp.net app that opened a word doc stored on the server, filled in
some information, then mailed the word doc to the user. This was all working
fine except for the fact that i had noticed WINWORD.EXEs were being left
behind on the server. On someones advice i updated to the latest Office 2000
SP, and have had this error ever
since. I have since tried: repairing office install,completely
reinstalling office,completely reinstalling visual studio to rebuild app,
reinstalling framework.. none of these have had any effect. It seems the SP
may have impacted the word object library (its the 9.0 library). The code is
as simple as:

Dim oWordApp As New Word.ApplicationClass
Dim oWordDoc As Word.Document = oWordApp.Documents.Open(fileName, missing,
false, missing, missing, missing, missing, missing, missing, missing,
missing, true)

As i mentioned it was working before the Office SP but now bombs on the
second line, even tho i'm back to the original office install. (I even tried
running Office Eraser to get completely rid of office before putting it
back).
P.S. the ASPNET account has rights to launch word under dcomcnfg

This one is really driving my nuts.. anyone got any ideas??
TIA
Lee.
 
N

nmulard

Have you tried to assign all classes access to separate variables :
Dim oWordApp As New Word.ApplicationClass
Dim oWordDocs as Word.Documents
oWordDocs = oWordApp.Documents
Dim oWordDoc As Word.Document
oWordDoc = oWordDocs.Open(fileName, missing,false, missing, missing,
missing, missing, missing, missing, missing,missing, true)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top