Knowing when to call Quit and when not to???

  • Thread starter Thread starter Shawn Anderson
  • Start date Start date
S

Shawn Anderson

I have a app that uses the outlook interop service. I am trying to figure
out how to know when to call quit on the application object and when not to
call it. Bascially, if my app is the one that started the outlook process I
want to call it, but if the user was already running outlook when they
launch my app, then I don't want to call quit. Is there a why to tell if my
app is responsible for the starting of outlook?

Shawn
 
Calling GetObject on Outlook.Application will return an instance of Outlook
if it was running and Nothing if not. If that succeeds set a Boolean that
indicates you started Outlook. If it fails then use CreateObject and set
your Boolean to False.

I'm not sure how that would code in NET code.
 
Anyone know how to do with in a .NET language?

Ken Slovak - said:
Calling GetObject on Outlook.Application will return an instance of
Outlook
if it was running and Nothing if not. If that succeeds set a Boolean that
indicates you started Outlook. If it fails then use CreateObject and set
your Boolean to False.

I'm not sure how that would code in NET code.
 

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

Back
Top