Using Aspose.Net library for word and pdf
I have an Word template which contains 4-5 paragraphs with font style “Times New Roman”. in this document a word “Hello” and I need to replace this Hello word with a new word “Hi” with new font style “Lucida Handwriting” and font size is 10 .
Note: I don’t want to change font style of whole document or paragraph. I just want to changes font style of the word “Hi”.
Please find the below code snippte:
Stream s = new MemoryStream(File, 0, File.Length, true, true); Aspose.Words.Document conv = new Aspose.Words.Document(s); conv.Range.Replace("Hello", "Hi", false, false); conv.Save(convPdf, Aspose.Words.SaveFormat.doc);
I am facing the same issue in the pdf.
I have also tried the Run class/method but did not worked.
I am a paid user of Aspose and please reply ASAP.