4

Can anyone tell how can change font size of entire word application using spire.doc?
How to select the entire text range and change the font size and style?

Can anyone please help me??

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
pavan betageri
  • 123
  • 1
  • 1
  • 9

1 Answers1

0

in Vb .net :

Dim document As New Document()
document.LoadFromFile("test.html", FileFormat.Html, XHTMLValidationType.None)
For Each section As Section In document.Sections
            For Each paragraph As Paragraph In section.Paragraphs
        For Each docObject As DocumentObject In paragraph.ChildObjects
            If docObject.DocumentObjectType = DocumentObjectType.TextRange Then
                Dim text As TextRange = TryCast(docObject, TextRange)
                text.CharacterFormat.FontName = "Calibri"
            End If
        Next docObject
    Next paragraph
Next section
document.SaveToFile("HtmlFileToPDF.pdf", FileFormat.PDF)