How to change font styles of merge fields. Without breaking the merge function?

Bear in mind, I’m a novice to OnlyOffice.

I’m trying to turn an existing (office 365 created) Word document into a Template for OnlyOffice, for two purposes seperately.

  1. Using the Merge Function to generate a series of documents from Spreadsheet rows.
  2. Experimenting to find out if I can turn the document into a Form, to input data into a Spreadsheet.

This focuses on number 1.

Whenever I insert merge fields, it seems their font styles are a mismatch with those of the document, but when I attempt to either change the styles for the table cell the field is placed in, or alter the font style for the field directly, the merge function effectively no longer operates.

Screenshot of the document section, note the style mismatch.

Admittedly, I’m used to MS Word, so I’ve looked across the Help section, but I haven’t found a tangible result on font style / merge fields. Undoubtedly I’m doing something wrong, perhaps because of differences between MS and OnlyOffice.

Any suggestions would be very welcome.

DocumentBuilder version: 7.3.2.8
Installation method: Cloud
OS:

To clarify, this is a screenshot with “preview results” active.

I’ve tested the data source, it’s valid. It also makes no difference whether it is linked from cloud or uploaded from local storage.

Hello @jcmrs
Do I understand it right that your final goal is creating docx file with changed font styles in the MailMerge scenario via DocBuilder?
Please take a look at these titles:
https://api.onlyoffice.com/docbuilder/textdocumentapi/api/mailmerge
https://api.onlyoffice.com/docbuilder/textdocumentapi/apirun/setfontfamily

If I misunderstood your request, please provide us with details (if it’s possible, please record a videofile with your test and provide us with test files - .docbuilder file with your script and output result file).