Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub EMailUsingLotusNotes(strSubject As String, strFile As String, _
strAddress As String, Optional strCopyTo As String, Optional strBody As String)
On Error GoTo Err_EMailUsingLotusNotes
' Sends simple email using Lotus Notes
' Does NOT Require Reference to Lotus Notes Object Library
' does not save to users sent box
Dim LotusSes As Object ' Lotus Notes Session
Dim LotusDbs As Object ' Lotus Notes Database
Dim LotusDoc As Object ' Lotus Notes Document
Dim LotusItem As Object ' Lotus Notes RichTextFile
Dim AttachedFile As Object ' Attachment
Set LotusSes = CreateObject("Notes.NotesSession")
Set LotusDbs = LotusSes.GETDATABASE("", "")
LotusDbs.OPENMAIL
Set LotusDoc = LotusDbs.CREATEDOCUMENT()
Set LotusItem = LotusDoc.CREATERICHTEXTITEM("Attachment")
Set AttachedFile = LotusItem.EMBEDOBJECT(1454, "", strFile, "Attachment")
LotusDoc.CREATERICHTEXTITEM ("Attachment")
With LotusDoc
.Subject = strSubject
.Body = strBody
.SendTo = strAddress
.CopyTo = strCopyTo
.SAVEMESSAGEONSEND = True
.Send False
End With
ExitHere:
Set LotusSes = Nothing
Set LotusDbs = Nothing
Set LotusDoc = Nothing
Exit Sub
Err_EMailUsingLotusNotes:
MsgBox "Error: Email was not sent to " & strAddress, _
vbOKOnly, "Error Sending Email!"
Resume ExitHere
End Sub