Word - styling part of field data before it's inserted into word?

0

I use a case management system at work that generates Word documents by inserting data from its database using fields.

I have a couple of fields that I need to style (bold, capitalize and underline), but only part of the field.

Is it possible for me to pre-format the string in the database to apply this style to the part of the field before it's inserted into Word?

I have already tried applying HTML and STYLEREF but these just display as plain text inside Word.

Any help would be much appreciated.

Thanks, Matt

Matt

Posted 2016-07-27T08:35:26.633

Reputation: 41

1Can you say a little more about exactly how the insertion is done, whether or not the system leaves fields in the document (or just results) and if so, what type of fields? – None – 2016-07-27T13:21:26.783

I'm not entirely sure. The final document just seems to be plain text with no fields left in it. – Matt – 2016-07-27T13:33:34.213

@bibadia This is how the fields are structured when inserted into the document through the application: { COMMENTS Client.Short_Name/Company_Name \* MERGEFORMAT } – Matt – 2016-07-27T13:34:50.450

Well, if the system is actually loading a value from the database into the comments built-in document property, then updating the COMMENTS fields, you would at least have the Mergeformat mechanism, which (in essence) preserves the existing format of the field result on a Word-by-word basis. But that oh really works if the source data always contains the same word count and you always want e.g. word 1 to be bolded. Otherwise, the system would have to have. Code that would recognise some form of markup in the data and apply it as it reached the field code by the data. – None – 2016-07-27T16:28:11.477

No answers