Bewerken

Delen via


MailMergeDataSource Interface

Definition

Represents the mail merge data source in a mail merge operation.

public interface class MailMergeDataSource
[System.Runtime.InteropServices.Guid("0002091D-0000-0000-C000-000000000046")]
public interface MailMergeDataSource
type MailMergeDataSource = interface
Public Interface MailMergeDataSource
Attributes

Remarks

Use the DataSource property to return the MailMergeDataSource object.

Properties

ActiveRecord

Returns or sets the active mail merge data record.

Application

Returns a Application object that represents the Microsoft Word application.

ConnectString

Returns the connection string for the specified mail merge data source.

Creator

Returns a 32-bit integer that indicates the application in which the specified object was created.

DataFields

Returns a MailMergeDataFields collection that represents the fields in the specified mail merge data source.

FieldNames

Returns a MailMergeFieldNames collection that represents the names of all the fields in the specified mail merge data source.

FirstRecord

Returns or sets the number of the first data record to be merged in a mail merge operation.

HeaderSourceName

Returns the path and file name of the header source attached to the specified mail merge main document.

HeaderSourceType

Returns a value that indicates the way the header source is being supplied for the mail merge operation.

Included

True if a record is included in a mail merge.

InvalidAddress

True for Microsoft Word to mark a record in a mail merge data source if it contains invalid data in an address field.

InvalidComments

If the InvalidAddress property is True, returns or sets a String that describes an invalid address error.

LastRecord

Returns or sets the number of the last data record to be merged in a mail merge operation.

MappedDataFields

Returns a MappedDataFields object that represents the mapped data fields available in Microsoft Word.

Name

Returns or sets the name of the specified object.

Parent

Returns an object that represents the parent object of the specified object.

QueryString

Returns or sets the query string (SQL statement) used to retrieve a subset of the data in a mail merge data source.

RecordCount

Returns an Integer that represents the number of records in the data source.

TableName

Returns a String with the SQL query used to retrieve the records from the data source file attached to a mail merge document. May be blank if the table name is unknown or not applicable to the current data source.

Type

Returns the type of mail merge data source.

Methods

Close()

Closes the specified Mail Merge data source, pane, or task.

FindRecord(String, Object)

Searches the contents of the specified mail merge data source for text in a particular field. Returns True if the search text is found.

FindRecord2000(String, String)

Reserved for internal use.

SetAllErrorFlags(Boolean, String)

Marks all records in a mail merge data source as containing invalid data in an address field.

SetAllIncludedFlags(Boolean)

True to include all data source records in a mail merge.

Applies to