@MNH ASP , Welcome to Microsoft Q&A, I suggest that you could use Find.MatchWildcards property (Word) to replace word by using regex in word file.
Here is a code example you could refer to.
I changed the words that start with Example to This is Example.
static void Main(string[] args)
{
Word.Application app=new Word.Application();
Word.Document doc = app.Documents.Open("test1.docx");
object missing = Missing.Value;
Word.Find findObject = app.Selection.Find;
findObject.ClearFormatting();
findObject.Text = "Example@";
findObject.MatchWildcards = true;
findObject.Replacement.ClearFormatting();
findObject.Replacement.Text = "This is Example";
object replaceAll = Word.WdReplace.wdReplaceAll;
findObject.Execute(ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing,
ref replaceAll, ref missing, ref missing, ref missing, ref missing);
doc.Save();
doc.Close();
}
Result:
Best Regards,
Jack
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.