Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access to Notes email - how to bold sections of text in mail body?

Status
Not open for further replies.

hartrim

MIS
Jan 25, 2002
1
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top