Late binding code
hi Norman,
Norman Yuan wrote:
On Error Resume Next
Set OutlookApp = GetObject(,"Outlook.Application")
If Err.Number0 Then
Err.Clear
Set OutlookApp=CreateObject("Outlook.Application")
If Err.Number0 Then
MsgBox "Cannot get Outlook"
Exit Sub
End If
End If
Due to the nature of Outlook, it is a single instance application, you
don't need the error trapping. The CreateObject will return the existing
instance or start a new one.
mfG
-- stefan --
|