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)
Syntax
'Declaration
Function AddFillIn ( _
Range As Range, _
ByRef Prompt As Object, _
ByRef DefaultFillInText As Object, _
ByRef AskOnce As Object _
) As MailMergeField
'Usage
Dim instance As MailMergeFields
Dim Range As Range
Dim Prompt As Object
Dim DefaultFillInText As Object
Dim AskOnce As Object
Dim returnValue As MailMergeField
returnValue = instance.AddFillIn(Range, _
Prompt, DefaultFillInText, AskOnce)
MailMergeField AddFillIn(
Range Range,
ref Object Prompt,
ref Object DefaultFillInText,
ref Object AskOnce
)
Parameters
- Range
Type: Microsoft.Office.Interop.Word.Range
Required Range object. The location for the FILLIN field.
- Prompt
Type: System.Object%
Optional Object. The text that's displayed in the dialog box.
- DefaultFillInText
Type: System.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 FILLIN field.
- AskOnce
Type: System.Object%
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.
Return Value
Type: Microsoft.Office.Interop.Word.MailMergeField
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.