Question

Thanks in advance for any help,

I have a word document in Microsoft Word 2010 for which I am using Merge Fields to put text into certain areas of the document.

In the text that gets put in the Merge field, is it possible to put styling inside that text?

For example, if the following sentence were to come in to a merge field: "Clouds are blue" and I needed the word blue to be bold, is there a way I can put the styling in the sentence? Ex: "Clouds are < strong >blue< /strong >"

Thanks again,

No correct solution

OTHER TIPS

The short answer is "not just using merge fields".

Some circumstances in which you might be able to do it just using fields:

  1. If you apply bold to the word "blue" (i.e. the third word), then add the *Mergeformat switch to the MERGEFIELD field, Word should apply the bold formatting to the third word in each value it merges using that mergefield. However, if any of the values merged have fewer than 3 words, Word may revert to not bolding the third word. And then there's the question as to what Word considers to be a "word".
  2. If you are merging from a document data source (e.g. a Word document, an RTF document) then you may still be able to use

{ thefieldname }

instead of

{ MERGEFIELD thefieldname }

but this is "legacy behaviour" that dates back to the time when there was no MERGEFIELD field type, and

a. I don't know whether it works in recent versions of Windows Word, or Mac Word at all

b. I suspect only some formatting features "get through"

Other ways to do this are to postprocess the merged text or use MailMerge events to modify the MERGEFIELD result formatting.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top