MailMergeFields.AddAsk (Word)

Adds an ASK field to a mail merge main document. Returns a MailMergeField object.

When updated, an ASK field displays a dialog box that prompts you for text to assign to the specified bookmark.

AddAsk (Range, Name, Prompt, DefaultAskText, AskOnce)


Dim rngTemp As Range 
 
Set rngTemp = ActiveDocument.Content 
 
rngTemp.Collapse Direction:=wdCollapseEnd 
ActiveDocument.MailMerge.Fields.AddAsk _ 
 Range:=rngTemp, _ 
 Prompt:="Type your company name", _ 
 Name:="company", AskOnce:=True

Arguments

The following arguments are required:

Range (Range) - The location for the ASK field.

Name (String) - The bookmark name that the response or default text is assigned to. Use a REF field with the bookmark name to display the result in a document.

Optional arguments

The following arguments are optional

Prompt (String) - The text that's displayed in the dialog box.

DefaultAskText (String) - The default response, which appears in the text box when the dialog box is displayed. Corresponds to the \d switch for an ASK field.

AskOnce (Boolean) - True to display the dialog box only once instead of each time a new record is merged. Corresponds to the \o switch for an ASK field.