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

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 
S

Shawn Anderson

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.
 
Top