Hi,
The distinction is lost on me. Shouldn't the mailmerge just replace the "Responsible_Person_Name" part, and not mess with the font part? <<
No, the merge process is not a replacement but an insertion process. The field is marked by the enclosing markers and those markers select the attribute of the text. This concept makes it possible to merge in text multiple times without destroying the form.
See this HTML code:
<div><mergefield name="Responsible_Person_Name"><font face="Arial" color="black" size="4">Responsible_Person_Name</font></mergefield></div>
<div><font face="Arial" color="black" size="4"><mergefield name="Responsible_Person_Name">Responsible_Person_Name</mergefield></div></font>
The first paragraph will not use a large font for the merged name, the second will.
If you do not like this behavior you need to add some code to the even OnMailMergeGetText:
if Contents.StartInspObject.EmbeddedText<>'' then // not empty!
Contents.MergeAttr.CharAttr :=
Contents.StartInspObject.ParentPar.CharAttr[
Contents.StartInspObject.ParentPosInPar+1];
This code will simply take the character attribute of the first character INSIDE the field and use it for the text it is about to merge in.
Julian