Hi,
I have a VB script that creates and excel spreadsheet saves it and then sends it as an attachment throught Lotus notes.
I would like to know how I could, instead of creating an attachment, paste special as Excel Worksheet into the body of the email.
The script works perfectly and sample below was stipped of any extras for sake of clarity.
Here is how my email is created:
Const EMBED_ATTACHMENT = 1454
Set session = CreateObject("Notes.NotesSession")
Set Db = session.GetDatabase("", "")
Call Db.OpenMail
Set Doc = Db.CreateDocument
Call Doc.ReplaceItemValue
Call Doc.ReplaceItemValue("SendTo", Recipient)
Call Doc.ReplaceItemValue("Subject", ReportName)
Set rtitem = Doc.CreateRichTextItem("Body")
Call rtitem.AppendText(MSG1)
Call rtitem.EmbedObject(EMBED_ATTACHMENT, "", Attachment)
Call rtitem.AppendText(Msg2)
Doc.SaveMessageOnSend = True
Call Doc.Send(False)
Set session = Nothing
End Sub
Thanks for any suggestion.
Mike
I have a VB script that creates and excel spreadsheet saves it and then sends it as an attachment throught Lotus notes.
I would like to know how I could, instead of creating an attachment, paste special as Excel Worksheet into the body of the email.
The script works perfectly and sample below was stipped of any extras for sake of clarity.
Here is how my email is created:
Const EMBED_ATTACHMENT = 1454
Set session = CreateObject("Notes.NotesSession")
Set Db = session.GetDatabase("", "")
Call Db.OpenMail
Set Doc = Db.CreateDocument
Call Doc.ReplaceItemValue
Call Doc.ReplaceItemValue("SendTo", Recipient)
Call Doc.ReplaceItemValue("Subject", ReportName)
Set rtitem = Doc.CreateRichTextItem("Body")
Call rtitem.AppendText(MSG1)
Call rtitem.EmbedObject(EMBED_ATTACHMENT, "", Attachment)
Call rtitem.AppendText(Msg2)
Doc.SaveMessageOnSend = True
Call Doc.Send(False)
Set session = Nothing
End Sub
Thanks for any suggestion.
Mike