Command ID 43 - 46: Delete, read and write a field

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

 

ID 43:

This command let you delete a certain merge field with the name StrParam.

 

If param>0 the text of the field will be deleted, otherwise only the start and end markers.

 

You can pass "*ALL*" as name to delete all fields.

 

ID 44:

Set the field save and load format, i.e. "RTF", "HTML-softlinebreaks" ... for the next use of ID 45 and ID 46.

 

ID 45:

Read the embedded text in the format set with ID 44

Param is the object type in the low byte. Use 1 for merge fields.

Add 8192 to Param to search from cursor position, add 4096 to compare the "Command" parameter instead of name.

Add 16384 to globally search for the field.

StrParam is the name of the object which should be saved.

 

ID 46:

load the embedded text in the format set with ID 44

Param is the object type in the low byte. Use 1 for merge fields.

Add 8192 to Param to search from cursor position, add 4096 to compare the "Command" parameter instead of name.

Add 16384 to globally search for the field.

StrParam is the the fieldname + "=" + new text.

 

An alternative is to use the regular save and load methods (LoadFromFile, SaveToFile) and specify the fieldname in the format string, i.e.

       "f:name=RTF" to save or load the contents of the field "name".

 

 

 


[command_id_43_delete_a_field.htm]    Copyright © 2007 by WPCubed GmbH