Microsoft
Software
Hardware
Network
Question : Need VB code to send out a Lotus Notes e-mail in monospaced font, such as COURIER NEW, not COURIER
How do I set "Courier New" as the font for richStyle.FontNotes?
richStyle.NotesFont=COURIE
R works but COURIER_NEW is not defined.
What I am looking for is a way to set a monospaced font when
composing a Lotus Notes email programmatically in VB. It doesn't
have to be using RichStyle, just the end result is I need a piece
of VB code that sends out a Lotus Notes email in a monospaced
font like COURIER NEW. Any help on this is greatly appreciated.
This almost works but cannot set a monospaced font:
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As New NotesDocument(db)
Dim richStyle As NotesRichTextStyle
Dim richText As New NotesRichTextItem(doc, "Body")
Set db = session.CurrentDatabase
Call doc.AppendItemValue ("From", session.UserName)
Call doc.AppendItemValue ("Subject", Inputbox("Subject?"))
Set richStyle = session.CreateRichTextStyl
e
richStyle.NotesFont = FONT_COURIER
richStyle.FontSize = 14
Call richText.AppendStyle(richS
tyle)
newPara = Inputbox ("Paragraph of text for ""Body"" item")
firstPara = True
While newPara <> ""
If firstPara Then
firstPara = False
Else
Call richText.AddNewLine(2)
End If
Call richText.AppendText(newPar
a)
newPara = Inputbox ("Paragraph of text for ""Body"" item")
Wend
End of problem description.
Answer : Need VB code to send out a Lotus Notes e-mail in monospaced font, such as COURIER NEW, not COURIER
You need to use a GetNotesFont call:
richStyle.NotesFont = richText.GetNotesFont("Cou
rier New", True)
Random Solutions
SQL Server 2005 Memory Usage
how to use data base in jsp?
Dynamically building an image menu?
OpenOffice 3.2 GPO Install Problem
OCS 2007 R2 and Cisco call manager
Terminal server 2008 R2 Pinned Taskbar Links
How many instances of a web application can run on a server
Microsoft System Center Ops Manager 2007 - Reporting
Server 2008 quickest way to delete a large folder with millions of files
Windows 7 recently used programs is blank