IMailMergeCallbackTagsReplaced Method
Called when "mustache" text tags are replaced with MERGEFIELD fields.

Namespace: Aspose.Words.MailMerging
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 20.1
Syntax
void TagsReplaced()
Examples
Shows how to define custom logic for handling events during mail merge.
Document document = new Document();
    document.MailMerge.UseNonMergeFields = true;

    MailMergeCallbackStub mailMergeCallbackStub = new MailMergeCallbackStub();
    document.MailMerge.MailMergeCallback = mailMergeCallbackStub;

    document.MailMerge.Execute(new string[0], new object[0]);

    Assert.AreEqual(1, mailMergeCallbackStub.TagsReplacedCounter);
}

private class MailMergeCallbackStub : IMailMergeCallback
{
    public void TagsReplaced()
    {
        TagsReplacedCounter++;
    }

    public int TagsReplacedCounter { get; private set; }
}
See Also