[dba-VB] Is Outlook Open (VB6)

Bryan Carbonnell carbonnb at sympatico.ca
Tue Feb 18 07:05:09 CST 2003


Cross-posted to AccessD and dba-vb

On 18 Feb 2003 at 10:14, paul.hartland at fsmail.net wrote:

> Anyone know how I can check to see if MS Outlook is open using VB6 ?

Paul,

How about something like this:

Dom objOut as object

On Error Resume Next

set objOut = GetObject("Outlook.Application")

if Err <> 0 Then
  MsgBox "Outlook is not open"
Else
  Msgbox "Outlook is open"
End if


--
Bryan Carbonnell - carbonnb at sympatico.ca
We've all heard that a million monkeys banging on a million 
typewriters will eventually reproduce the entire works of 
Shakespeare.
Now, thanks to the Internet, we know this is not true.^ [Robert 
Wilensky (1997)]





More information about the dba-VB mailing list