J
jpb
Looking to send reports and attachments using lotus notes email directly (if
using the send.object command lotus notes open the message OK but waits for
user to manually send the message). Looking to send automatically.
This code works for sending the body of the message.
How to send a report or excel file as an attachment?
Thanks
Private Sub Command9_Click()
Dim notesdb As Object
Dim notesdoc As Object
Dim notesrtf As Object
Dim notessession As Object
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", strSupportEMail)
Call notesdoc.ReplaceItemValue("Sendto", "86927")
Call notesdoc.ReplaceItemValue("Subject", "Problem Report")
Set notesrtf = notesdoc.CREATERICHTEXTITEM("body")
Call notesrtf.APPENDTEXT("Problem Report")
Call notesrtf.ADDNEWLINE(2)
's = ActiveDocument.Path + "\" + ActiveDocument.Name
'Call notesrtf.embedObject(1454, "", strCurrentPath, "Mail.rtf")
'Call notesrtf.EMBEDOBJECT(1454, "", strCurrentPath, "c:\temp\test.xls")
Rem send message
Call notesdoc.SEND(False)
Set notessession = Nothing
End Sub
using the send.object command lotus notes open the message OK but waits for
user to manually send the message). Looking to send automatically.
This code works for sending the body of the message.
How to send a report or excel file as an attachment?
Thanks
Private Sub Command9_Click()
Dim notesdb As Object
Dim notesdoc As Object
Dim notesrtf As Object
Dim notessession As Object
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", strSupportEMail)
Call notesdoc.ReplaceItemValue("Sendto", "86927")
Call notesdoc.ReplaceItemValue("Subject", "Problem Report")
Set notesrtf = notesdoc.CREATERICHTEXTITEM("body")
Call notesrtf.APPENDTEXT("Problem Report")
Call notesrtf.ADDNEWLINE(2)
's = ActiveDocument.Path + "\" + ActiveDocument.Name
'Call notesrtf.embedObject(1454, "", strCurrentPath, "Mail.rtf")
'Call notesrtf.EMBEDOBJECT(1454, "", strCurrentPath, "c:\temp\test.xls")
Rem send message
Call notesdoc.SEND(False)
Set notessession = Nothing
End Sub