Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

The Ask field code causes Word to prompt you to enter information, which it then assigns to a named variable, called a bookmark.

A field codetells Word what to insert or provide to the document after determining the value of the field code, such as the current date or the number of pages. Usually, the resulting value is simply displayed as part of the document. You can toggle between viewing the result or viewing the field code by pressing Alt+F9 on Windows or fn+Option+F9 on Mac.

You can use the Ask field in a document or as part of a mail merge. Word prompts you for a response each time you update the Ask field, or when you step through the records in a mail merge. To display the response in the content of the document, you must insert a Ref field after the Ask field.

Tip:  One way to update a field is to select it, and then, on Windows, press F9 or, on Mac, press Shift+Option+The Command button.+U.

In this topic:

Syntax

When you view the Ask field code in your document, the syntax looks like this:

{ ASK Bookmark"Prompt" [Optional switches ] }

Instructions

Bookmark

The bookmark name assigned to the response to the prompt, for example, ClientName.

"Prompt"

Prompt text, which is displayed in a dialog box — for example, "Enter the client's name."

Optional switches

\d "Default "

Specifies a default response if you don't type a response in the prompt dialog box. For example, the field

{ ASK Typist "Enter typist's initials:" \d "tds" } assigns "tds" to the bookmark Typist if you don't enter a response.

If you don't specify a default response, Word uses the last response that was entered. To specify a blank entry as the default, type empty quotation marks after the switch. For example, type \d "" .

\o

When used in a mail merge main document, displays the prompt one time instead of each time you merge a new data record. The same response is inserted in each resulting merged document.

Example

The following example describes a report form that asks for the month of the report and then automatically displays the answer in various places in the report.

ASK field in action
  1. An Ask field with a bookmark of MonthReport and prompt of What month is this report for? has been inserted near the beginning of the document.

  2. The month name occurs several places in the document. A Ref field that specifies the MonthReport bookmark has been inserted in each of these places.

  3. If you perform a mail merge or update the field, Word displays the prompt specified in the field code and accepts entry of text. In this example, the user typed August in response to the prompt.

  4. Each of the Ref fields is updated with the content of the MonthReport bookmark: in this example, August.

Top of Page

Use the Ask field in a document

To use the Ask field in a document, do the following:

  1. On the Insert tab, in the Text group, click Quick Parts, and then click Field.

  2. In the Field names list, select Ask.

  3. In the Prompt box, type the question that you want answered.

  4. In the Bookmark name box, type a name for the bookmark that will store the response to the prompt.

  5. If you want a predefined response, select the Default response to prompt check box, and type the text.

  6. If you want the same response to apply to all the records in a mail merge, select the Prompt before merging bookmark text check box. Otherwise, Word will prompt you for a response with each record.

  7. Click OK.

Top of Page

Use the Ask field in mail merge

To use the Ask field as part of a mail merge, do the following while you are setting up the mail merge:

  1. On the Mailings tab, in the Write & Insert Fields group, click Rules, and then click Ask.

  2. In the Bookmark box, type a name for the bookmark that will store the response to the prompt.

  3. In the Prompt box, type the question you want answered.

  4. If you want a predefined response, type the response in the Default bookmark text box.

  5. If you want the same response to apply to all the records in the merge, select the Ask once check box. Otherwise, Word will prompt you for a response with each record.

Top of Page

Insert a Ref field to display the value saved by the Ask field

To insert a Ref field for displaying the content of a bookmark, do the following:

  1. Place the insertion point in the document after the ASK field.

  2. On the Insert tab, in the Text group, click Quick Parts, and then click Field.

  3. In the Field names list, select Ref.

  4. In the Bookmark name list, select the name of the bookmark that is defined in the ASK field.

  5. Click OK.

Top of Page

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×