![]() ![]() Tr.CharacterFormat.FontName = "Cataneo BT" "to enables developers to operate Word witout Microsoft Word installed.") NET Introduction"ĭim para2 As Paragraph = section.Paragraphs(1)ĭim tr As TextRange = para2.AppendText("Spire.Doc for. NET.docx")ĭim section As Section = document.Sections(0)ĭim para1 As Paragraph = section.Paragraphs(0) NET and follow the code below to edit Word document.ĭocument.LoadFromFile("E:\Work\Documents\WordDocuments\Spire.Doc for. Set CharacterFormat properties for this TextRange, including FontName, FontSize and TextColor. Declare a TextRange instance and set its value as new added contents. For distinguishing new contents and existing contents, new contents are formatted in this example. The overload passed to this method is string text. Invoke Paragraph.AppendText method to add new contents for this paragraph. ![]() Secondly, declare another Paragraph instance and its value is set as Paragraph two. Set its Text property to update the original contents. The editing result is shown as following screenshot.įirstly, declare a Paragraph instance and its value is set as paragraph one (title). In this example, the title is updated and new text is added in paragraph two (Title is paragraph one). NET Word component, offers a Paragraph class, which enables users to edit contents in paragraphs through set its properties. This guide demonstrates a solution to edit Word document in C# and VB.NET. In order to correct wrong spellings or add some new contents in a Word document, users need to edit an existing Word document.
0 Comments
Leave a Reply. |