Field codes: Set field

Microsoft Office Word 2003

Bookmark "Text" }

Defines the information represented by the specified bookmark name. You can refer to the bookmark in a macro or include it in another field, such as IF. To print the information, you must insert a REF field in the document.

ShowInstructions

Bookmark

The bookmark name that will represent the information— for example, InterestRate.

"Text"

Information represented by the bookmark. Enclose text in quotation marks; numbers don't require quotation marks. The information can be the result of a nested field.

ShowExamples

If the value entered in response to the FILLIN prompt is 3, the resulting value of the TotalCost bookmark is $82.50. REF fields are used to print the cost and the name of the order taker. A numeric picture switch displays the resulting value with a currency symbol. Note the quotation marks in the first SET field.

Field:

{ SET EnteredBy "Maria Gerard" }
{ SET UnitCost 25.00 }
{ SET Quantity { FILLIN "Enter number of items ordered:" } }
{ SET SalesTax 10% }

Field Use:

{ SET TotalCost { = (UnitCost * Quantity) + ((UnitCost * Quantity) * SalesTax) } }
Total cost: { TotalCost \# "$#0.00" }
Thank you for your order,
{ EnteredBy }