Excel macro send rich mail using LotusNotes
- by CC
Hi everybody.
I'm working on a small macro to send mail from excel 2007 using my Lotus Notes session.
The sending mail part is working fine.
Now I need to send in the body part, a part of a stylesheet (for instance the area from A1:B20). This area has colors, bold font.
To send my email here is the code:
Set oSess = CreateObject("Notes.NotesSession")
Set oDB = oSess.GETDATABASE("", "")
Call oDB.OPENMAIL
flag = True
If Not (oDB.IsOpen) Then flag = oDB.Open("", "")
If Not flag Then
MsgBox "Can't open mail file: " & oDB.SERVER & " " & oDB.FILEPATH
End If
On Error GoTo err_handler
'Building Message
Set oDoc = oDB.CREATEDOCUMENT
Set oItem = oDoc.CREATERICHTEXTITEM("BODY")
oDoc.Form = "Memo"
'mail subject
oDoc.Subject = "subject"
'mail body
oDoc.sendto = "[email protected]"
oDoc.body = "my text"
oDoc.postdate = Date
oDoc.SaveMessageOnSend = True
oDoc.visable = True
'Sending Message
oDoc.SEND False
Does anybody has an idea about how to send a stylesheet ?
Thanks alot.