Specifies the font to use when inserting text. This property is temporarily overridden by the <font> tag in the XHTML. If this property is not set, the document's default font is used.

<table class="wysiwyg-macro" data-macro-name="unmigrated-wiki-markup" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e3VubWlncmF0ZWQtd2lraS1tYXJrdXB9&amp;locale=en_GB&amp;version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>
 public SoftArtisans.OfficeWriter.WordWriter.Font DefaultFont{ get; set; }
</pre></td></tr></table>
<p>Public Property DefaultFont() As SoftArtisans.OfficeWriter.WordWriter.Font</p>

The default value is null. The font in the document's default style will be used. (This is generally Times New Roman 12 pt.)


  //--- Create a WordApplication and open a Document
  WordApplication wordApp = new WordApplication();
  Document doc = wordApp.Create();
			
  //--- Create the HTMLToWord object
  HTMLToWord h2w = new HTMLToWord();

  //--- Create the font to use when inserting HTML
  //--- Start by getting the "Normal" font from the Document
  Font font = doc.Styles[NamedStyle.BuiltIn.Normal].Font;

  //--- Change the font to 10 pt. Arial with red text
  font.FontName = "Arial";
  font.FontSize = 10;
  font.TextColor = System.Drawing.Color.Red;

  //--- Set this as the default font on the HTMLToWord object
  h2w.InsertProperties.DefaultFont = font;

  //--- Insert the htmlFragment at the end of the document.
  h2w.InsertHTML(htmlFragment, doc, Nothing, doc);


  '--- Create a WordApplication and open a Document
  Dim wordApp As New WordApplication()
  Dim doc As Document = wordApp.Create()
			
  '--- Create the HTMLToWord object
  Dim h2w As New HTMLToWord()

  '--- Create the font to use when inserting HTML
  '--- Start by getting the "Normal" font from the Document
  Dim font as Font = doc.Styles(NamedStyle.BuiltIn.Normal).Font

  '-- Change the font to 10 pt. Arial with red text
  font.FontName = "Arial"
  font.FontSize = 10
  font.TextColor = System.Drawing.Color.Red

  '--- Set this as the default font on the HTMLToWord object
  h2w.InsertProperties.DefaultFont = font

  '--- Insert the htmlFragment at the end of the document.
  h2w.InsertHTML(htmlFragment, doc, Nothing, doc)