To modify the format of a database field on a Microsoft Word user document, field switches are used. Below is a list of the most commonly used switches. More options and details can be found here.
ALT+F9 will toggle hide/display field formats. Use ALT+F9 to enter the field switch mode in Word.
CTRL+F9 will Add { } to a field. These brackets are used to designate field and their corresponding switches. CTRL+F9 must be used to add a bracket pair (the "{" and "}" keys on your keyboard will not work).
Dates |
|
January 1, 2015 |
{ DATE \@ “MMMM d, yyyy” \* MERGEFORMAT } |
12/25/15 |
{ DATE \@ “MM/dd/yy” \* MERGEFORMAT } |
For Blank Dates w/time |
{ if { MERGEFIELD JobDueDate }="12:00:00 AM" "" "{ MERGEFIELD JobDueDate \@ "MM/DD/YY" \* MERGEFORMAT }"} |
For Blank Dates w/o time |
{ if { MERGEFIELD JobDueDate }="01/01/0001" "" "{ MERGEFIELD JobDueDate \@ "MM/DD/YY" \* MERGEFORMAT }"} |
|
|
Text |
|
Standard |
{ MERGEFIELD Size } |
Text if other has value |
{ If { MERGEFIELD Size } = “” “” “Size:” } |
Field if other has value |
{ If { MERGEFIELD Size } = “” “” “{ MERGEFIELD Size }” } |
|
|
Numeric Fields |
|
w/ commas |
{ MERGEFIELD Q1PartQuantity \# #,### } |
w/o commas |
{ MERGEFIELD Q1PartQuantity \# #### } |
w/ $ and commas |
{ MERGEFIELD Q1PartQuotePrice \# $#,### } |
w/ $, commas , cents |
{ MERGEFIELD Q1PartQuotePrice \# $#,###.00 } |
Blank if other has no value |
{ If { MERGEFIELD Q1PartQuotePrice } = “0” “” “{ MERGEFIELD Q1PartQuotePrice \# $#,### }”} |
|
|
Equations |
|
Subtotal |
{ If { MERGEFIELD Q1PartQuantity } = “0” “” “{ MERGEFIELD Q1PartQuotePrice \# $#,###.00}”} |
Sales Tax |
{ If { MERGEFIELD Q1PartQuantity } = “0” “” “{={ MERGEFIELD Q1PartQuotePrice}*0.07 \# $#,###.00}”} |
Total |
{ If { MERGEFIELD Q1PartQuantity } = “0” “” “{={ MERGEFIELD Q1PartQuotePrice}*1.07 \# $#,###.00}”} |
|
|
Other |
|
Repeat all for next section |
{ NEXT } |
Article ID: 138, Created: April 25, 2014 at 8:35 PM, Modified: June 29, 2015 at 7:55 PM