I have an app that uses Outlook email. It works fine when installed on PCs runningn Outlook.
My question is should it work when installed on PCs running Lotus Notes cc:Mail? Shouldn't the Outlook DLL (outlctl.dll) and Outlook object library (msoutl9.olb) references be sufficient to make it connect to the local email system?
This is kind of how the call is made in the program, and the corresponding subroutine!
Just want to know if it can be done... before trying to install on a cc:Mail machine!
'-- CALL THE EMAIL PROCESS AND SEND IT THE USER SPECIFIED/DEFAULT PARAMETERS
SendMyReport SendTo, SendCc, SendSubject, SendMessage, G_PDF_FILE
Private Sub SendMyReport(Recipient As String, CC As String, Subject As String, Body As String, Attach As String)
On Error GoTo ErrHandler
Dim objOL As New Outlook.Application
Dim objMail As MailItem
'-- CREATE A NEW MAIL ITEM
Set objMail = objOL.CreateItem(olMailItem)
With objMail
'-- SET THE RECIPIENTS
.To = IIf(Recipient <> "", Recipient, ""
'-- SET THE CC
.CC = IIf(CC <> "", CC, ""
'-- SET THE SUBJECT
.Subject = IIf(Subject <> "", Subject, ""
'-- SET THE BODY
.Body = IIf(Body <> "", Body, ""
'-- CHECK FOR ATTACHMENT
If Attach <> vbNullString Then
'-- ADD ATTACHMENT
.Attachments.Add Attach
End If
'-- SEND IT
.Send
End With
'-- CLEAN UP MEMORY
Set objMail = Nothing
Set objOL = Nothing
ErrHandler:
'MsgBox "Error " & Err.Number & " " & CStr(Err.Description) & " " & CStr(Err.Source)
End Sub
My question is should it work when installed on PCs running Lotus Notes cc:Mail? Shouldn't the Outlook DLL (outlctl.dll) and Outlook object library (msoutl9.olb) references be sufficient to make it connect to the local email system?
This is kind of how the call is made in the program, and the corresponding subroutine!
Just want to know if it can be done... before trying to install on a cc:Mail machine!
'-- CALL THE EMAIL PROCESS AND SEND IT THE USER SPECIFIED/DEFAULT PARAMETERS
SendMyReport SendTo, SendCc, SendSubject, SendMessage, G_PDF_FILE
Private Sub SendMyReport(Recipient As String, CC As String, Subject As String, Body As String, Attach As String)
On Error GoTo ErrHandler
Dim objOL As New Outlook.Application
Dim objMail As MailItem
'-- CREATE A NEW MAIL ITEM
Set objMail = objOL.CreateItem(olMailItem)
With objMail
'-- SET THE RECIPIENTS
.To = IIf(Recipient <> "", Recipient, ""
'-- SET THE CC
.CC = IIf(CC <> "", CC, ""
'-- SET THE SUBJECT
.Subject = IIf(Subject <> "", Subject, ""
'-- SET THE BODY
.Body = IIf(Body <> "", Body, ""
'-- CHECK FOR ATTACHMENT
If Attach <> vbNullString Then
'-- ADD ATTACHMENT
.Attachments.Add Attach
End If
'-- SEND IT
.Send
End With
'-- CLEAN UP MEMORY
Set objMail = Nothing
Set objOL = Nothing
ErrHandler:
'MsgBox "Error " & Err.Number & " " & CStr(Err.Description) & " " & CStr(Err.Source)
End Sub