Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

 
 
Microsoft Office Word
Search
Search
 
Check for updates: (c) Microsoft
Office downloads
 
 
 
Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Email this linkEmail this link Printer-Friendly VersionPrinter-Friendly Version Bookmark and ShareShare
Field codes: Set field
 

{ SET Bookmark "Text" }

Defines the information represented by the specified bookmark (bookmark: A location or selection of text in a file that you name for reference purposes. Bookmarks identify a location within your file that you can later refer or link to.) name. You can refer to the bookmark in a macro (macro: An action or a set of actions that you can use to automate tasks. Macros are recorded in the Visual Basic for Applications programming language.) 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 (numeric picture switch (\#): Specifies how Microsoft Word will display the numeric result of a field. This switch is called a "picture switch" because you use symbols to show how you want the field result to look.) 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 }

advertisement