FindReplaceOptionsApplyParagraphFormat Property |
Namespace: Aspose.Words.Replacing
Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); builder.Writeln("Every paragraph that ends with a full stop like this one will be right aligned."); builder.Writeln("This one will not!"); builder.Writeln("And this one will."); FindReplaceOptions options = new FindReplaceOptions(); options.ApplyParagraphFormat.Alignment = ParagraphAlignment.Right; int count = doc.Range.Replace(".&p", "!&p", options); Assert.AreEqual(2, count); doc.Save(ArtifactsDir + "Range.ApplyParagraphFormat.docx");