MailMergeFields.AddFillIn Method 

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

Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in microsoft.office.interop.word.dll)

Usage

Dim Range As Range
Dim Prompt As Object
Dim DefaultFillInText As Object
Dim AskOnce As Object
Dim returnValue As MailMergeField
Dim mailMergeFields1 As MailMergeFields
returnValue = mailMergeFields1.AddFillIn(Range, Prompt, DefaultFillInText, AskOnce)

Syntax

Function AddFillIn( _
    <InAttribute()> ByVal Range As Range, _
    <InAttribute()> Optional ByRef Prompt As Object, _
    <InAttribute()> Optional ByRef DefaultFillInText As Object, _
    <InAttribute()> Optional ByRef AskOnce As Object _
) As MailMergeField
MailMergeField AddFillIn(
    [In] Range Range, 
    [In, Optional] ref object Prompt, 
    [In, Optional] ref object DefaultFillInText, 
    [In, Optional] ref object AskOnce
);
public: MailMergeField^ AddFillIn(
    Range^ Range, 
    &Object^ Prompt, 
    &Object^ DefaultFillInText, 
    &Object^ AskOnce
);
public MailMergeField AddFillIn(
    /*in*/Range Range, 
    /*in*/System.Object Prompt, 
    /*in*/System.Object DefaultFillInText, 
    /*in*/System.Object AskOnce
);
function AddFillIn(
     Range : Range, 
     Prompt : Object, 
     DefaultFillInText : Object, 
     AskOnce : Object
) : MailMergeField;

Parameters

  • Range
    Required Range object. The location for the FILLIN field.
  • Prompt
    Optional Object. The text that's displayed in the dialog box.
  • DefaultFillInText
    Optional Object. The default response, which appears in the text box when the dialog box is displayed. Corresponds to the \d switch for an FILLIN field.
  • AskOnce
    Optional Object. True to display the prompt only once instead of each time a new data record is merged. Corresponds to the \o switch for a FILLIN field. The default value is False.

Remarks

When updated, a FILLIN field displays a dialog box that prompts you for text to insert into the document at the location of the FILLIN field.

Use the Add method with the Fields collection object to add a FILLIN field to a document other than a mail merge main document.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

See Also

Reference

MailMergeFields Interface
Microsoft.Office.Interop.Word Namespace

Other Resources

MailMergeFields Members