I hava a question with the the api “Range.Replace(String, String, FindReplaceOptions) Method”.
I want to replace or delete the first section break of the word file and keep the format unchanged.
@gxhllj The problem occurs because you replace section break with manual line break. In this case paragraphs between section break are concatenated and formatting of one paragraph is applied (alignment and first line indent). To get the desired result you should use paragraph break &p instead of manual line break &l:
doc.Range.Replace("&b", "&p", new Aspose.Words.Replacing.FindReplaceOptions());
@gxhllj Could you please elaborate what problem you are talking about? Please attach your output and expected output documents? This will help us to better understand your requirements.
@gxhllj Thank you for additional information. As I can see you are using old 16.7 version of Aspose.Words. The problem is not reproducible with the latest 22.3 version of Aspose.Words.