Using version 7.33.1 with Delphi Tokyo Update 2.
Here is basically what I'm doing in code to create an HTML email from WPTools document.
1. Inserting dates into documents using using wp.InputTextFieldName('DATE').
2. Docs are saved/loaded from a database using using wp.LoadFromStream(mergefilestream);
3. Data is queried and the merge begins something like this:
wp.MergeText('', true);
wp.SaveToString('HTML', False);
In the merged document that is saved to HTML, the DATE value is not the current date but rather the date the "DATE" was inserted using the "InputTextFieldName" method.
Still the document shows the value saved in the original RTF the day the document was created with the DATE field.
For example, in the raw RTF I see {\field{\*\fldinst{DATE}}{\*\fldrslt{08/29/2017}}} In the merged RTF saved to HTML the value is still 08/29/2017 rather than today's date.
Here is what I've tried.
1. Rather than using InputTextFieldName('DATE') I used InputTextField(wpoDate); for new documents,
2. OnMailMergeGetText
if UpperCase(inspname) = 'DATE'
then strVal := DateToStr(Now);
3. OnTextObjGetTextEx
if UpperCase(TXTObject.Name) = 'DATE' then
begin
PrintString := DateToStr(Now);
TXTObject.Params := PrintString;
end;