ReplaceAction IReplacingCallback.Replacing(ReplacingArgs e)
{
Document subDoc = new Document(RunExamples.GetDataDir_WorkingWithDocument() + "InsertDocument2.doc");
// Insert a document after the paragraph, containing the match text.
Paragraph para = (Paragraph)e.MatchNode.ParentNode;
InsertDocument(para, subDoc);
// Remove the paragraph with the match text.
para.Remove();
return ReplaceAction.Skip;
}
}