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!

how to evaluate if Outlook is running?

Status
Not open for further replies.

ikim2000

MIS
May 23, 2002
22
CA
With VB, how can I evaluate if Outlook is already running?
and if it is, how do I make it the active window?

thanks,
Ike
 


Dim olApp As New Outlook.Application
Dim olInstance As Outlook.Explorer
Dim olNamespace As Outlook.NameSpace

' See if an instance is running
Set olInstance = olApp.ActiveExplorer
If Not olInstance Is Nothing Then
' User's Email running, display
Set olNamespace = olApp.GetNamespace("MAPI")
' Set to default draft folder view
Set olApp.ActiveExplorer.CurrentFolder = olNamespace.GetDefaultFolder(olFolderDrafts)
olApp.ActiveExplorer.Display
End If

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top