You can update the fields that are used to merge the text and define the formatting in MS Word.
In the merged document, please
select the merge field to be updated and then:
- Press Shift + F9 in Windows (Use Fn + Shift + F9 in OSX) to change to "field view".
- Click with the mouse button on the field you would like to edit and add the formatting instructions (see below) at the end of the field (but before the closing curly brackets"}"). An example field would look like {MERGEFIELD session_start\@ "DD.MMMM.YYYY" } .
- Update the field by pressing F9 in Windows (Use Fn + F9 in OSX).
Alternatively you can also use ALT + F9 (Fn + Option + F9 in OSX) to toggle all fields between "field view" and "mail merge preview".
Formatting BasicsThere are 3 different methods to format text.
If you are formatting text fields, start your code with \* , for numeric fields start with \# and for date-time fields start with \@.
Text FormattingThe codes for text fields (alphanumeric fields) can be found here:
Microsoft Support: Insert and format field codes in Word - Format switch Example Codes:
\* Caps This switch capitalizes the first letter of each word.
\* FirstCap This switch capitalizes the first letter of the first word.
\* Upper This switch capitalizes all letters.
\* Lower This switch changes all letters to lower case.
Number FormattingThe available switches are described here:
Microsoft Support: Insert and format field codes in Word - Numeric format switch Example Codes:
\# "0.00" to see numbers in the format 1234.50
\# "#,##0.00;- #,##0.00" to see positive numbers in the format 1,234.50 and negative numbers in the format -1,234.50
\# "$#,##0.00;- $#,##0.00" to see positive numbers in the format $1,234.50 and negative numbers in the format -$1,234.50
Date and Time FormattingThe date-time field codes are explained here:
Microsoft Support: Insert and format field codes in Word - Date-Time format switch Example codes:
\@ "dd-MMM-yy" to see the date in the format "28-Feb-16"
\@ "dd/MM/yyyy" to see the date in the format "28/02/2016"
\@ "dd MMMM yyyy" to see the date in the format "28 February 2016"
\@ "dddd, dd MMMM yyyy" to see the date in the format "Sunday, 28 February 2016"
\@ "HH:mm" to see the time in the format "13:45"
\@ "HH:mm:ss" to see the time in the format "13:45:30"
\@ "h:mm AM\PM" to see the time in the format "1:45 PM"
\@ "h:mm:ss AM\PM" to see the time in the format "1:45:30 PM"
More information can be found at:
Microsoft Support: Insert and format field codes in WordMicrosoft Support: Field codes in WordYou can find an example file below.
Please note that you have to convert date-time fields to time fields first in Excel if you want to use the Word formatting options for times. It seems to be a bug in Word 2007 and later. To create a time field from a data field in Excel, please add an empty column and use the code:
=TIME(HOUR(C2),MINUTE(C2), SECOND(C2))
... where C2 is the original date-time field. The new fields must have a time formatting (use the right mouse button to change the formatting).
The code in
German Excel is:
=ZEIT(STUNDE(C2);MINUTE(C2);SEKUNDE(C2))