MustacheTag
Contents
[
Hide
]MustacheTag class
Represents “mustache” tag.
public class MustacheTag
Properties
Name | Description |
---|---|
ReferenceOffset { get; } | Gets the zero-based starting position of the tag from the start of the ReferenceRun . |
ReferenceRun { get; } | Gets the run that contains the beginning of the tag. |
Text { get; } | Gets the text of the tag. |
Examples
Shows how to work with the mustache tags.
Document document = new Document(MyDir + "Mail merge mustache tags.docx");
document.MailMerge.UseNonMergeFields = true;
MailMergeRegionInfo hierarchy = document.MailMerge.GetRegionsHierarchy();
foreach (MustacheTag mustacheTag in hierarchy.MustacheTags)
{
Console.WriteLine(mustacheTag.Text);
Console.WriteLine(mustacheTag.ReferenceOffset);
Console.WriteLine(mustacheTag.ReferenceRun);
}
foreach (MailMergeRegionInfo region in hierarchy.Regions)
{
Console.WriteLine(region.StartMustacheTag.Text);
Console.WriteLine(region.EndMustacheTag.Text);
}
See Also
- namespace Aspose.Words.MailMerging
- assembly Aspose.Words