Command ID 17 - Token To Template Conversion

[Top]  [Chapter]  [Previous]  [Next]

The  token to template conversion uses special character combinations to separate the commands from the text. Fields have to be embedded into the characters << and >> (can be customized)

 

The command ID 17 starts the conversion. The result is "" or an error description.

 

This conversion can be used to create mail merge documents and report templates. The creation of a report template requires that the reporting has been activated using SetEditorMode.

 

Please see the report template syntax description!

 

Parameters

 

a) Using the integer parameter it is possible to only select certain sub passes of the conversion:

 

If the parameter is 0 and reporting has been activated a report template will be created. If reporting is not active only merge fields will be created.

 

b) The string parameter has to be empty or consists of 2 or 4 lines (separated by CRNL)

1. Line = Start code, default <<

2. Line = End code, default >>

3. Line = Band character, default :

4. Line = Group character, default #

 

Examples

 

a) Create merge template and merge text:

 

wpdllInt1.Memo.TextCommandStr(17, 3, "");

wpdllInt1.Memo.MergeText("");

 

b) Create reporting template:

 

wpdllInt1.SetEditorMode(

   EditorMode.wpmodDoubleEditor,

   EditorXMode.wpmodexToolbar|

   EditorXMode.wpmodexPDFExport|

   EditorXMode.wpmodexSpellcheck|

   EditorXMode.wpmodexTables|

   EditorXMode.wpmodexReporting,

   EditorGUI.wpguiRuler|

   EditorGUI.wpguiHorzScrollBar|

   EditorGUI.wpguiVertScrollBar|

   EditorGUI.wpguiPanelH1,

   EditorGUI.wpguiDontSet);

wpdllInt1.Memo.TextCommandStr(17, 0, "");

 

Category

Mailmerge

 


[command_id_17___token_to_templ.htm]    Copyright © 2007 by WPCubed GmbH