Working with Word for WinForms / Advanced Level Working / Adding Fonts
Adding Fonts

Using the right font makes the document stand out. You may want to create a document with a variety of font styles to display every text written in different font style appear distinct. You can use different fonts to your word document using the following code:

' draw text in many fonts
Dim font As New Font("Tahoma", 9)
Dim ifc As New InstalledFontCollection()
For Each ff As FontFamily In ifc.Families
        ' create font
        Dim sample As Font = Nothing
        For Each fs As FontStyle In [Enum].GetValues(GetType(FontStyle))
                If ff.IsStyleAvailable(fs) Then
                        sample = New Font(ff.Name, 9, fs)
                        Exit For
                End If
        Next
        If sample Is Nothing Then
                Continue For
        End If

        ' show font
        C1Word.AddParagraph(ff.Name, font, Color.Black)
        C1Word.AddParagraph("The quick brown fox jumped over the lazy dog. 1234567890!", sample, Color.Black)
        sample.Dispose()
Next