Here's a quick example:
Dim rtb As New RichTextBox
rtb.Text = "This is alpha - a."
rtb.SelectAll()
rtb.SelectionFont = New Font(New FontFamily("Arial"), 12, FontStyle.Regular,
GraphicsUnit.Pixel)
rtb.Select(16, 1)
rtb.SelectionFont = New Font(New FontFamily("Symbol"), 12,
FontStyle.Regular, GraphicsUnit.Pixel)
rtb.SaveFile("test.rtf")
Brian Davis
http://www.knowdotnet.com
"Brian Davis" <br***@knowdotnet.nospam.com> wrote in message
news:uN*************@TK2MSFTNGP11.phx.gbl...
You can use the RichTextBox object to create the file. Check out the
Select method, the SelectionFont property and the SaveFile method.
Brian Davis
http://www.knowdotnet.com
"Phil Galey" <pa*****@starcalif.com.nospam> wrote in message
news:uf**************@TK2MSFTNGP11.phx.gbl... From VB.NET, I need to write text to an RTF file, where most of it is
words in one font like arial, but a couple of individual characters along the
way are of a different font, e.g. a solid diamond from the ZapfDingbats font
or a square from the GeographicSymbols font. So it needs to switch fonts
four times along the way.
Does anyone know how this can be done in VB.NET? Thanks.