B
Boss
Hi,
I got the below code to send email from access using lotusnotes.
Private Sub Command0_Click()
Dim notesdb As Object
Dim notesdoc As Object
Dim notesrtf As Object
Dim notessession As Object
Dim strmessage As String
Set notessession = CreateObject("Notes.Notessession")
Set notesdb = notessession.GetDatabase("", "")
Call notesdb.OpenMail
Rem make new mail message
Set notesdoc = notesdb.CreateDocument
Call notesdoc.replaceitemvalue("Sendto", "(e-mail address removed)")
Call notesdoc.replaceitemvalue("CopyTo", "(e-mail address removed)")
Call notesdoc.replaceitemvalue("Subject", "Subject Report") ' subject
Set notesrtf = notesdoc.createrichtextitem("body")
strmessage = table1
Call notesrtf.appendtext(strmessage) ' email text
Call notesdoc.Send(False)
Set notessession = Nothing
MsgBox "done"
End Sub
I also need to send data from table "table1" but not as attachment but in
the message body.
Please help me with some code or links. Thx!
Boss
I got the below code to send email from access using lotusnotes.
Private Sub Command0_Click()
Dim notesdb As Object
Dim notesdoc As Object
Dim notesrtf As Object
Dim notessession As Object
Dim strmessage As String
Set notessession = CreateObject("Notes.Notessession")
Set notesdb = notessession.GetDatabase("", "")
Call notesdb.OpenMail
Rem make new mail message
Set notesdoc = notesdb.CreateDocument
Call notesdoc.replaceitemvalue("Sendto", "(e-mail address removed)")
Call notesdoc.replaceitemvalue("CopyTo", "(e-mail address removed)")
Call notesdoc.replaceitemvalue("Subject", "Subject Report") ' subject
Set notesrtf = notesdoc.createrichtextitem("body")
strmessage = table1
Call notesrtf.appendtext(strmessage) ' email text
Call notesdoc.Send(False)
Set notessession = Nothing
MsgBox "done"
End Sub
I also need to send data from table "table1" but not as attachment but in
the message body.
Please help me with some code or links. Thx!
Boss