MailMergeFields.AddAsk(Range, String, Object, Object, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds an ASK field to a mail merge main document. Returns a MailMergeField object.
public Microsoft.Office.Interop.Word.MailMergeField AddAsk (Microsoft.Office.Interop.Word.Range Range, string Name, ref object Prompt, ref object DefaultAskText, ref object AskOnce);
abstract member AddAsk : Microsoft.Office.Interop.Word.Range * string * obj * obj * obj -> Microsoft.Office.Interop.Word.MailMergeField
Public Function AddAsk (Range As Range, Name As String, Optional ByRef Prompt As Object, Optional ByRef DefaultAskText As Object, Optional ByRef AskOnce As Object) As MailMergeField
Parameters
- Name
- String
Required 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.
- Prompt
- Object
Optional Object. The text that's displayed in the dialog box.
- DefaultAskText
- Object
Optional Object. 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
- Object
Optional Object. True to display the dialog box only once instead of each time a new data record is merged. Corresponds to the \o switch for an ASK field.
Returns
Remarks
When updated, an ASK field displays a dialog box that prompts you for text to assign to the specified bookmark.