Automation urgent help

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:
Object oName = "C:\\improvement.doc";
Word.Application wrdApp;
Word._Document wrdDoc;
wrdApp = new Word.Application();
wrdDoc = wrdApp.Documents.Add(ref oName, ref oFalse,
ref oMissing, ref oMissing);
wrdDoc.Select();

So, Why it's telling me that wrdDoc.Select(); "is not set to an instance of
an object." when it's accessed from a remote machine but not when running it
locally in debug mode!!?
 
M

Mark Rae

I'm doing a server side automation(I know it's bad but..)

OK, let me get this straight - you are doing something which you already
know to be patently stupid, and now you are wondering why it doesn't
work...?
So, Why it's telling me that wrdDoc.Select(); "is not set to an instance
of
an object." when it's accessed from a remote machine but not when running
it
locally in debug mode!!?

Sigh - because when you're running it all locally on the same machine, it's
not doing server-side automation - don't you get it...???
 
G

Guest

There is no need for such harsh answer, I was just asking!!
isn't that what forums are about!? discussing and sharing ideas?
Sigh - because when you're running it all locally on the same machine, it's
not doing server-side automation - don't you get it...???
I'm beginner if I knew the answer for my question I wouldn't ask in the
first place
 
M

Mark Rae

I'm beginner if I knew the answer for my question I wouldn't ask in the
first place

The very first line of your OP was:
"I'm doing a server side automation(I know it's bad but..)"

Clearly, you're not so much of a beginner to know that what you are trying
to do (server-side automation) doesn't work...
isn't that what forums are about!? discussing and sharing ideas?

Sure, but there's very little point in asking for help with something you
already know is never going to work!
 

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,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top