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.
Function SendTPAEmail(strRecipient As Variant, strPath1 As String, strPath2 As String)
On Error GoTo ErrHandler
Dim objNotesSession As Object
Dim objNotesDatabase As Object
Dim objNotesDocument As Object
Dim strText As String
Dim strMsg As String
Dim varRecipient As Variant
Dim objAttach As Object
Dim objEmbed As Object
[b]this sets the Notes Session[/b]
Set objNotesSession = CreateObject("Notes.Notessession")
[b]gets the local mail database[/b]
Set objNotesDatabase = objNotesSession.GETDATABASE("", "")
[b]opens the local mail database[/b]
Call objNotesDatabase.OPENMAIL
[b]creates a new document[/b]
Set objNotesDocument = objNotesDatabase.CREATEDOCUMENT
strText = ""
[b]splits the recipient array separated by ;[/b]
varRecipient = Split(strRecipient, ";", -1)
[b]replaces notes document items with who to send to, the subject[/b]
Call objNotesDocument.REPLACEITEMVALUE("SendTo", varRecipient)
Call objNotesDocument.REPLACEITEMVALUE("Subject", "Daily E-mail")
Call objNotesDocument.REPLACEITEMVALUE("Body", strText)
[b]creates a Rich text item attachment in the email[/b]
Set objAttach = objNotesDocument.CREATERICHTEXTITEM("Attachment")
[b]embeds the attachment in the object[/b]
Set objEmbed = objAttach.EMBEDOBJECT(1454, "", strPath1, "Attachment")
Set objEmbed = objAttach.EMBEDOBJECT(1454, "", strPath2, "Attachment")
[b]indicates to save the message[/b]
objNotesDocument.SAVEMESSAGEONSEND = True
[b]sends the email[/b]
Call objNotesDocument.SEND(False)
Set objNotesSession = Nothing
ErrHandler:
If Err.Number <> 0 Then
MsgBox Err.Number & Err.Description, , "Message Alert"
End If
End Function
Set objNotesDatabase = session.GetDatabase(servername.Abbreviated, "mail.box")
Set objNotesDocument = New NotesDocument(objNotesDatabase)
objNotesDocument.Form = Memo