Add insertpoint in code -- how to show name?

  • I'm upgrading from wp4 to wp6, and am creating a merge field in code. The ReplacementVar is a string, and in ongettext, I provide a value.

    The problem is, when I'm editing the mergetemplate, I don't see the name, just the <<>> delimiters. Existing templates do display the name, but when I add a new field to the existing template, it doesn't show.

    Code
    var inputMergeFld: TWPTextObj;inputMergeFld := rtfTemplate.InputMergeField(ReplacementVar);

    Later ..

    Ok, I found this and it works. Does seem pretty wierd, considering that the manual implies this is the default behavior:

    Code
    with rtfTemplate.InsertPointAttr do CodeOpeningText := CodeOpeningText+'%N';