WPCubed Product Support

"Flatten" merge fields?

rackerson

My application contains a collection of WPTools documents containing merge fields. I have a client request to be able to export these documents; as part of the export process, they need me to convert the merge fields. The placeholders need to be converted to text.

I admittedly do not see the value in this but, hey, the client is paying for it!

I know I can use the GetFieldList method to retrieve a list of the merge fields in my document but is there a way to convert them from merge fields to literal text? The text that should appear in place of the merge tag is the merge field's id.

Thanks.

#1 ♥ 0
4.3k Views 2 users read 1 min
support

The easiest is to save the text to string/stream/file with the format option 'RTF-IgnoreFields'

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