automation "Object reference not set to an instance of an object."

G

Guest

I'm doing a server side automation(I know it's bad but..) and its working
fine locally and when accessing it from a remote machine using web browser is
was giving me this error"Retrieving the COM class factory for component with
CLSID
{000209FF-0000-0000-C000-000000000046} failed due to the following error:
80070005". so I configured the server using dcomcnfg as described in this
link:
http://support.microsoft.com/kb/288368/
and know this error now is gone but I'm having this error:"Object reference
not set to an instance of an object." when it comes to the last line of this
code:

Word.Application wrdApp;
Word._Document wrdDoc;
wrdApp = new Word.Application();
wrdDoc = wrdApp.Documents.Add(ref oName, ref oFalse,
ref oMissing, ref oMissing);
wrdDoc.Select();
 
A

Alvin Bruney [MVP]

Do you actually have a valid object? meaning is wrdApp non-null? If this is
true, the particular property or method may not exist on the object.

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
OWC Black book on Amazon and
www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
 
A

Alvin Bruney [MVP]

The probable explanation for this is that you have two different word
objects installed on these different machines. You can go trouble-shooting
to find out, but it's really an exercise in futility. Just make sure that
the app that is failing contains the appropriate word version registered.
That may clear it up.

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
OWC Black book on Amazon and
www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top