Solved

Application object.

Posted on 2004-08-23
9
179 Views
Last Modified: 2010-05-02
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?
0
Comment
Question by:sunilramu
9 Comments
 
LVL 15

Expert Comment

by:unknown_routine
Comment Utility
Word has not terminated properly.

Use quit method and set object to nothing when you are done with the object.
0
 

Author Comment

by:sunilramu
Comment Utility
Sorry I didnt mention, I did use qui and set the application object to nothing, but doesnt seem to work!
0
 
LVL 3

Expert Comment

by:nichia
Comment Utility
What's the exact error message, and what is the line which causes it?
0
 
LVL 15

Expert Comment

by:unknown_routine
Comment Utility
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 1

Accepted Solution

by:
LastToKnow0 earned 500 total points
Comment Utility
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
 

Author Comment

by:sunilramu
Comment Utility
Error Number : 462
Error Description: The Remote Server Machine does not exist or is unavailable .
0
 

Author Comment

by:sunilramu
Comment Utility
BTW its a VB6 Application
0
 

Author Comment

by:sunilramu
Comment Utility
http://support.microsoft.com/default.aspx?scid=kb;EN-US;188546

i tried the alternative suggested by MS, doesnt seem to work!
0
 

Author Comment

by:sunilramu
Comment Utility
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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now