Is there any way to format a doc quickly? such as set the each Paragraph LineSpace to 20 pound, Set the fontname of all the words to “Times New Roman”, Set the color of all the words to black,…
I use the method as following:
For Each Para As Global.Aspose.Words.Paragraph In doc.GetChildNodes(Global.Aspose.Words.NodeType.Paragraph, True)
Para.ParagraphFormat.LineSpacing = Global.Aspose.Words.ConvertUtil.InchToPoint(12 / 72)
For Each run As Global.Aspose.Words.Run In runs
run.Font.Size = Global.Aspose.Words.ConvertUtil.InchToPoint(TFontSize.Text / 72)
run.Font.Color = System.Drawing.Color.Black
The above code can make the goal, however it took a long time to complete the work.
Is there any way to do this quickly like MS Office Word?
Another question is that how to quickly search one or more special paragraphs or words, and then quickly format them (such as set the fontsize, fontname, fontcolor, paragraph line space, fontbold…and so on) . I used the method like the above, but it always takes a long time to finish the task.
Using the above codes, it will take about more than one minute to finish a doc, whereas it only takes about several second to finish the task in MS Office Word.
Thanks for your suggestion.