Cultural Issues
To format a merge field, right click it and select Toggle Field Code. You can use most of formats supported by Word.
Some switches are not directly supported by Word, but are by QDV7. They are used to display and format values in a different culture than the document one. By default, formats are set according to the culture given by the language code of your document but can be changed.
The format descriptor starts by \# for numeric formats and by \@ for date formats.
Examples:
- Currency format: \# c
For a generic format such as \# c to be worth of another culture than the document's culture, add \ci behind: \# "c \ci fr-BE"
This displays the currencies according to fr-BE rules regardless of the culture of the calling document.
You can also format as you would do in Word: \# "$,#,#0.00"
- Long date format: \@ "dddd, MMMM d, yyyy" (Friday, April 5, 2013)
Formats fully supported by QDV7, but not directly by Word:
▪Standard numeric formats: http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx
▪Custom numeric formats: http://msdn.microsoft.com/en-us/library/0c899ak8.aspx
▪Standard date and time formats: http://msdn.microsoft.com/en-us/library/az4se3k1.aspx
▪Custom date and time formats: http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
Here are two examples of field codes in Word:
{ MERGEFIELD Price \# $,#.00 \* MERGEFORMAT }
{ MERGEFIELD Date \@ yyyy-MM-dd \* MERGEFORMAT }
\* MERGEFORMAT indicates that the format of the merge field is kept (color, shape, font, etc.). This setting comes after the format descriptor.