WPCubed Product Support

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.

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:

with rtfTemplate.InsertPointAttr do CodeOpeningText := CodeOpeningText+'%N';
#1 ♥ 0
3.4k Views 2 users read 1 min
support

Hi,

thats correct. You can also use the new V6 property ShowMergeFieldNames. It will display the fields as objects and hide the contents.

Julian

#2 ♥ 0

ShowMergeFieldNames is exactly what I was looking for. Perfect. I like the way they display too, very nice.

Jeremy

#3 ♥ 0
This category is archived. No new posts are possible.