Dear all,When creating an email programatly using the NotesStream class, if email is saved goes to drafts, OK.
I would like to display part of the body field in bold.
If I look the draft email in web browser it display what I want.
But if I look the email in Lotus Notes client, the bold characteristic is not working.
Could you please help me with this matter?
PS: I must/need use the notesstream class instead the notesrichtextitem.
I put here the code for your tests.
Dim s As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim body As NotesMIMEEntity
Dim header As NotesMIMEHeader
Dim stream As NotesStream
Set db = s.CurrentDatabase
Set stream = s.CreateStream
s.ConvertMIME = False ’ Do not convert MIME to rich text
Set doc = db.CreateDocument
doc.Form = “Memo”
Set body = doc.CreateMIMEEntity
Set header = body.CreateHeader(“Subject”)
Call header.SetHeaderVal(“HTML message”)
Set header = body.CreateHeader(“To”)
Call header.SetHeaderVal(“user@us.ibm.com”)
Call stream.writetext(||)
Call stream.writetext(||)
Call stream.writetext(|
|)Call stream.writetext(|
|)Call stream.writetext(|
|)Call stream.writetext(|
|)Call stream.writetext(|
| Hello World! |
user$ = s.CommonUserName 'if scheduled agent this returns the name of the server
'Below uses the ampersand (&) to concatenate user$
Call stream.writetext(|
| & user$ &||)
Call stream.writetext(||)
Call stream.writetext(||)
Call body.SetContentFromText(stream, “text/HTML;charset=UTF-8”, ENC_IDENTITY_7BIT)
Call doc.save(True,True)
s.ConvertMIME = True ’ Restore conversion - very important