Application object.

Hi experts,

I am using getObject and CreateObject to create an instance of Word.Application
i need to invoke the word application open a document, create table of contents, merge a title page,
create different header footer for title page and different pagenumbering style for TOC, I have to do this a few times on different documents. I have achieved most of it, now problem i am facing is that when i try to create Application.Word object after Quiting the word for the first time it seems to go thru, but when i access some objects it throws automation server unavailable error. does anybody here has solutions or know why this is happenning?
sunilramuAsked:
Who is Participating?
 
LastToKnow0Connect With a Mentor Commented:
Are you using .net?  .net seems to have some problems releasing COM objects under certain conditions.

see:  http://support.microsoft.com/default.aspx?scid=kb;en-us;305823&Product=NETFrame
0
 
unknown_routineCommented:
Word has not terminated properly.

Use quit method and set object to nothing when you are done with the object.
0
 
sunilramuAuthor Commented:
Sorry I didnt mention, I did use qui and set the application object to nothing, but doesnt seem to work!
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
nichiaCommented:
What's the exact error message, and what is the line which causes it?
0
 
unknown_routineCommented:
Question:

In the tasklisk "do you still see word application after you use quit and nothing.?"

Answer is probably yes, but please  double check this is the case.

0
 
sunilramuAuthor Commented:
Error Number : 462
Error Description: The Remote Server Machine does not exist or is unavailable .
0
 
sunilramuAuthor Commented:
BTW its a VB6 Application
0
 
sunilramuAuthor Commented:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;188546

i tried the alternative suggested by MS, doesnt seem to work!
0
 
sunilramuAuthor Commented:
The Problem was that i was using inchestopoints and it seemed to fail on that every time, now that i am hardcoding margins everythings seems to work, thank you all ....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.