Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening Outlook 1

Status
Not open for further replies.

RonRepp

Technical User
Feb 25, 2005
1,031
US
Hi all:

I need to open and close Outlook for an unattended program that I run.

Right now, I am only able to open it through the shell command.

Is there a way to open it using the application object? (You can Quit using app object, but how can you open?)

Any help will be greatly appreciated.

Ron Repp

If gray hair is a sign of wisdom, then I'm a genius.
 
Have a look at the CreateObject function:
Set myOL = CreateObject("Outlook.Application")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV:

Thanks for the response. I already use the createobject most of the time for Outlook, so I know the procedure well. However, if Outlook is not open, it does not open it and the code fails.



Ron Repp

If gray hair is a sign of wisdom, then I'm a genius.
 
it does not open it and the code fails
It shouldn't, unless you have some profile issues or the app is not properly registered ?
BTW, any error message ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
A work around:
launch the app through the shell command as you know this way works and then play with the GetObject function.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
That's what I have now, but thanks.

A star for the effort.

Ron Repp

If gray hair is a sign of wisdom, then I'm a genius.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top