Display A New Explorer

T

Terence

Is there a way in Outlook VB to make an explorer when none exists? I need
an explorer so I can simulate clicking the send/receive button for e-mail
sending:

Set oButton = olApp.ActiveExplorer.CommandBars.FindControl(1, 5488)
oButton.Execute

The problem is that if I start outlook in VB - Set olApp =
CreateObject("Outlook.Application") - Outlook doesn't open up visually and
so there are no explorers. Is there a way to either (a) startup outlook
visually or (b) create a new explorer once outlook has been started?

Thanks,
Terence
 
D

Dmitry Streblechenko

Try

set Inbox = Application.Session.GetDefaultFolder(olFolderInbox)
Inbox.Display

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Top