From various posts on here I've now got the code to loop through an Access record set and send out emails from Lotus Notes. What I can't work out is how to set for example sentence 2 below to bold text. Any help gratefully received.
Sub send()
Set notessession = CreateObject("Notes.Notessession")
Set notesdb = notessession.GetDatabase("", "")
Call notesdb.OPENMAIL
Set notesdoc = notesdb.CreateDocument
Call notesdoc.replaceitemvalue("Sendto", pername)
Call notesdoc.replaceitemvalue("Subject", "This is the subject of the email")
body_text = "This is the first sentence in normal text."
body_text = body_text & vbCrLf & "This is the second sentence which should be bold."
Set notesrtf = notesdoc.CreateRichTextItem("body")
Call notesrtf.AddNewLine(1)
Call notesrtf.AppendText(body_text)
Call notesrtf.AddNewLine(4)
notesdoc.SAVEMESSAGEONSEND = savesent
Call notesdoc.send(False)
Set notessession = Nothing
End Sub
Sub send()
Set notessession = CreateObject("Notes.Notessession")
Set notesdb = notessession.GetDatabase("", "")
Call notesdb.OPENMAIL
Set notesdoc = notesdb.CreateDocument
Call notesdoc.replaceitemvalue("Sendto", pername)
Call notesdoc.replaceitemvalue("Subject", "This is the subject of the email")
body_text = "This is the first sentence in normal text."
body_text = body_text & vbCrLf & "This is the second sentence which should be bold."
Set notesrtf = notesdoc.CreateRichTextItem("body")
Call notesrtf.AddNewLine(1)
Call notesrtf.AppendText(body_text)
Call notesrtf.AddNewLine(4)
notesdoc.SAVEMESSAGEONSEND = savesent
Call notesdoc.send(False)
Set notessession = Nothing
End Sub