Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

Sets or returns a String that represents the name of the font used in this formatting.

Signature
C#
C#
<table class="diff-macro"><thead><tr><th class="diff-macro-title">unmigrated-wiki-markup</th></tr></thead><tbody><tr><td class="diff-macro-body"><pre>
 public System.String FontName{ get; set; }
</pre></td></tr></tbody></table>
Signature
vb.net
vb.net
Public <p>Public Property FontName() As String</p>String
Remarks

MS Word equivalent: Format menu > Font... > Font tab > Font:

Example
Code Block
csharp
csharp
titleC#
            //--- Return FontName
          string fontName = oFont.FontName;

          //--- Set Fontname
          oFont.FontName = "Arial";
        
Code Block
vb.net
vb.net
titlevb.net
            '--- Return FontName
          Dim fontName As String = oFont.FontName

          '--- Set FontName
          oFont.FontName = "Arial"