Email Lotus Notes

S

StephanieH

I'm trying to send a spreadsheet via Lotus Notes AND update the body of the
email at the same time. Excell make it easy to address the email, fill in
the subject, and attach the sheet; but difficult to fill in the body.

This is the most recent code I found that will do this:
http://www.excelkb.com/?cNode=1X5M7A. Since it's a few years old, I thought
I'd ask if it's any easier now. (I'm in Excel 2003, so it's highly unlikely
but worth a try.)

Also, any ideas on why it's a simple process in Access but two pages of code
in Excel?
 
S

StephanieH

Ha ha... Can't say I disagree with you there. Now, if I could only convince
my employer of the same........

Thanks Ron, I'll go check it out.
 
D

Deke

Hi,

I have the same problem, life would be so much easier with Outlook.

I had the same problem, but I found the following code in the forum
somewhere, can remember where.

I uses standard string's for everything, so it's quite easy to change them
as required.

Function Send_Report_Email() As Boolean
Dim Full_Mailbox_Name As String

Full_Mailbox_Name = "Your Group Mailbox Here"
Set Session = CreateObject("Notes.NotesSession")
Set Maildb = Session.GetDatabase("G01", "gcc/iscpimgt.nsf")
If Maildb.IsOpen = False Then Maildb.OPENMAIL
Set MailDoc = Maildb.CreateDocument
MailDoc.Form = "Memo"
Set MailDocField = MailDoc.ReplaceItemValue("ReplyTo", Full_Mailbox_Name)
Set MailDocField = MailDoc.ReplaceItemValue("DisplayFrom",
Full_Mailbox_Name)
MailDoc.SendTo = Mail_Recipient
MailDoc.Subject = Mail_Subject
MailDoc.Body = Mail_Body
MailDoc.SaveMessageOnSend = True
If Mail_Attachment <> "" And Dir(Mail_Attachment) <> "" Then
Set AttachME = MailDoc.CreateRichTextItem("Mail_Attachment")
Set EmbedObj = AttachME.EmbedObject(1454, "", Mail_Attachment,
"Mail_Attachment")
End If
MailDoc.Send 0, MailDoc.SendTo
Maildb.Close
Set Maildb = Nothing
Set MailDoc = Nothing
Set AttachME = Nothing
Set Session = Nothing
Set EmbedObj = Nothing
Send_Change_Report_Email = True
End Function

I'm using Excel 2003 and Notes Client 6.5.4 and it works perfectly.

Another thing I found, again somewhere, for the Mail_Recipient string if you
define the string like below, you can get multiple recipient's :-

Mail_Recipient = VBA.Array("(e-mail address removed)", "(e-mail address removed)")

Hope this is of some help and not to obvious...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top