J
jerry
Below is my code for sending a worksheet automatically using the
default mailsystem . I want to include error trapping within this
select case. currently even after detecting the default mailsystem,
the email cannt be sent due to way the mailsystem has been installed.
Thanks in advance for your help.
Select Case Application.MailSystem
'If outlook send the email
Case xlMAPI
ActiveWorkbook.SendMail Recipients:=strRecipients
MsgBox "Thank You."
Case xlNoMailSystem
If LotusNotesInstalled = False Then 'check if Lotus
Notes is installed
MsgBox "No mail system installed! Please send the
email by attaching the file directly from " & workrequestfilename
Else
If SendWithLotusNotes(workrequestfilename, filename,
strRecipients) = False Then
'alert the user if the SendWithLotusNotes code
doesn't run successfully
MsgBox "The Work Request has NOT been successfully
sent but, it has been Saved " , vbExclamation + vbOKOnly, "File was
NOT emailed"
GoTo exSub
End If
End If
Case Else
MsgBox "Mailsystem(Outlook/Lotus Notes) is not
configured. " & workrequestfilename
End Select
default mailsystem . I want to include error trapping within this
select case. currently even after detecting the default mailsystem,
the email cannt be sent due to way the mailsystem has been installed.
Thanks in advance for your help.
Select Case Application.MailSystem
'If outlook send the email
Case xlMAPI
ActiveWorkbook.SendMail Recipients:=strRecipients
MsgBox "Thank You."
Case xlNoMailSystem
If LotusNotesInstalled = False Then 'check if Lotus
Notes is installed
MsgBox "No mail system installed! Please send the
email by attaching the file directly from " & workrequestfilename
Else
If SendWithLotusNotes(workrequestfilename, filename,
strRecipients) = False Then
'alert the user if the SendWithLotusNotes code
doesn't run successfully
MsgBox "The Work Request has NOT been successfully
sent but, it has been Saved " , vbExclamation + vbOKOnly, "File was
NOT emailed"
GoTo exSub
End If
End If
Case Else
MsgBox "Mailsystem(Outlook/Lotus Notes) is not
configured. " & workrequestfilename
End Select