M
muyBN
I get the above message upon running the following code. I tried the
suggestions in the Help issue and I have set the references in the VBE.
Dim blnStarted As Boolean, objOutlookApp As Outlook.Application, objItem As
Outlook.MailItem
~~
Set objOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
Set objOutlookApp = CreateObject("Outlook.Application")
blnStarted = True
End If
Set objItem = objOutlookApp.CreateItem(olMailItem)
With objItem
..To = strEmail
..Subject = strSubject
..Body = strBody
..Display
End With
Set objItem = Nothing
Set objOutlookApp = Nothing
suggestions in the Help issue and I have set the references in the VBE.
Dim blnStarted As Boolean, objOutlookApp As Outlook.Application, objItem As
Outlook.MailItem
~~
Set objOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
Set objOutlookApp = CreateObject("Outlook.Application")
blnStarted = True
End If
Set objItem = objOutlookApp.CreateItem(olMailItem)
With objItem
..To = strEmail
..Subject = strSubject
..Body = strBody
..Display
End With
Set objItem = Nothing
Set objOutlookApp = Nothing