MailMergeFields.AddSet(Range, String, 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 a SET field to a mail merge main document. Returns a MailMergeField object.
public Microsoft.Office.Interop.Word.MailMergeField AddSet (Microsoft.Office.Interop.Word.Range Range, string Name, ref object ValueText, ref object ValueAutoText);
abstract member AddSet : Microsoft.Office.Interop.Word.Range * string * obj * obj -> Microsoft.Office.Interop.Word.MailMergeField
Public Function AddSet (Range As Range, Name As String, Optional ByRef ValueText As Object, Optional ByRef ValueAutoText As Object) As MailMergeField
Parameters
- Name
- String
Required String. The bookmark name that ValueText
is assigned to.
- ValueText
- Object
Optional Object. The text associated with the bookmark specified by the Name
argument.
- ValueAutoText
- Object
Optional Object. The AutoText entry that includes text associated with the bookmark specified by the Name
argument. If this argument is specified, ValueText
is ignored.
Returns
Remarks
A SET field defines the text of the specified bookmark.