MailMergeDataSource.InvalidComments Property
Word Developer Reference |
If the InvalidAddress property is True, returns or sets a String that describes an invalid address error. Read/write.
Syntax
expression.InvalidComments
expression A variable that represents a MailMergeDataSource object.
Remarks
Use the SetAllErrorFlags method to set both the InvalidAddress and InvalidComments properties for all records in a data source.
Example
This example loops through the records in the mail merge data source and checks whether the ZIP Code field (in this case field number six) contains fewer than five digits. If a record does contain a ZIP Code of fewer than five digits, the record is excluded from the mail merge, the address is marked as invalid, and a comment about why the record was excluded is added.
Visual Basic for Applications |
---|
|
See Also