Hi,
I am trying to get a MS Access database to generate a Lotus Notes email with pre populated text and append at least 1 attachment.
We are able to get the email generated OK and ready to send but cannot find the right code to add an attachment.
The code we are using to create the mail is below, I would appreciate any help on getting the last bit of the code.
Public Sub ComposeMemo(ByVal recipient As String, ByVal subject As String, ByVal Mtxt As String)
Dim sess As Object
Set sess = CreateObject("Notes.NotesSession")
Dim ws As Object
Set ws = CreateObject("Notes.NotesUIWorkspace")
Dim mailServer As String
mailServer = sess.GetEnvironmentString("MailServer", True)
Dim mailFile As String
mailFile = sess.GetEnvironmentString("MailFile", True)
Dim sendTo As String
sendTo = recipient
Dim bodytext As String
bodytext = Mtxt
Dim uidoc As Object
Set uidoc = ws.ComposeDocument(mailServer, mailFile, "Memo")
Call uidoc.fieldsettext("EnterSendTo", sendTo)
Call uidoc.fieldsettext("Subject", subject)
Call uidoc.fieldsettext("Body", bodytext)
AppActivate (uidoc.WindowTitle)
End Sub