Hi everyone! I’m trying to search for a specific text in a word document and add text after it. How is possible in c# ?
Thanks a lot in advance!
Thanks for your inquiry. Please check following example, you can use IReplacingCallback to search and add text. Hopefully it will help you to accomplish the task.
ReplaceAction IReplacingCallback.Replacing(ReplacingArgs e)
{
e.Replacement = e.Match.ToString() + " Test";
//e.Match.ToString() + mMatchNumber.ToString();
return ReplaceAction.Replace;
}
Best Regards,