A new ND6 NotesRichTextItem method... GetNotesFont
OK... I'm a little slow...
(You in the back row! That's enough of the "a little slow what?" comments!)
One thing I like to do in agents that send out emails is to use the NotesRichTextStyle class to do formatting like bolding, font sizing, etc. But what I've always disliked is that for font faces, you are pretty much restricted to Helv, Roman, and Courier. I was looking through the Designer Help for formatting on something, and I ran across a new method in NotesRichTextItem called GetNotesFont. What it allows you to do is get a reference to another font type and use that instead...
Returns an identifier for a font face in a document.
Note: This method is new with Release 6.
notesFont% = notesRichTextItem.GetNotesFont( faceName$, addOnFail )
String. The name of the font face, which must be valid for the platform on which the agent is running.
True assigns an identifier for the font face if one is not already assigned in the current document.
False (default) returns 0 if an identifier is not assigned for the font face in the current document.
Integer. The identifier associated with the specified font face, or 0.
The identifier can be used to set NotesFont in NotesRichTextStyle.
Identifiers assigned by GetNotesFont are in the range 5 through 254.
So, since I like Georgia fonts, I decided to send out this particular email set in Georgia, like so...
'Set a style for the text in the email. Set rtsText = session.CreateRichTextStyle() rtsText.FontSize = 11 rtsText.Italic = False rtsText.Bold = False rtsText.NotesFont = rtiBody.GetNotesFont("Georgia", True) Call rtiBody.AppendStyle(rtsText)
provided by Julian Robichaux at nsftools.com.