AddAsk Method Example

This example adds an ASK field at the end of the active mail merge main document.

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

This example adds an ASK field after the last mail merge field in Main.doc.

Set myMMFields = Documents("Main.doc").MailMerge.Fields
myMMFields(myMMFields.Count).Select
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdMove
myMMFields.AddAsk Range:=Selection.Range, Name:="name", _
    Prompt:="What is your name"