Thanks for your request. Sure you can achieve this. You can use IReplacingCallback and regular expressions to achieve this. For instance see the following simple code:
public void Test001()
// Open document.
Document doc = new Document(@"Test001\in.doc");
// Replace placeholders like <> with values.
doc.Range.Replace(new Regex(@"\<\<(?\S+)\>\>"), new PlaceholderReplacingCallback(), false);
// Save output.
private class PlaceholderReplacingCallback : IReplacingCallback
public ReplaceAction Replacing(ReplacingArgs args)
// Get the name of placeholder (text betwwen delimiters).
string name = args.Match.Groups["name"].Value;
// Set the appropriate replacement.
args.Replacement = "Alexey";
args.Replacement = "Noskov";
But if what you need is filling your template with data, then I think Mail Merge might be a better option for you. Please follow the link for more information:
Thanks for your request. No, you cannot. To use mail merge, you should use mergefields as placeholders. However, nothing is impossible. You can use IReplacingCallback to replace placeholders with mergefields. You can find a simple code example here:
Thanks for the reply!