View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Cinda Cinda is offline
external usenet poster
 
Posts: 1
Default Excel VBA coding - Outlook and Shut down issue

I ran across this code posted on another site (see reference below)
that opens Outlook if it isn't running. This might give you what you
need for #1.

'Get Outlook if it's running
Set oOutlookApp = GetObject(, "Outlook.Application")
If Err < 0 Then
'Outlook wasn't running, start it from code
Set oOutlookApp = CreateObject("Outlook.Application")
bStarted = True
End If

This is posted on the Word MVP Site
(http://word.mvps.org/FAQs/InterDev/SendMail.htm) by Astrid Zeelenberg
(http://word.mvps.org/AboutMVPs/astrid_zeelenberg.htm).

(I'm not sure what the proper etiquette is for referencing another's
code, but we're all here to share, right?)

As for #2, in the recent posts from this Google site, I just read one
that talks about a similar issue. Don't know if that might get you on
the right track...
http://groups.google.com/group/micro...d56c4101871f17

Good luck!

--Cinda