MailMerge.DataSource Property

Publisher Developer Reference

Returns a MailMergeDataSource object that refers to the data source attached to a mail merge or catalog merge main publication.

Syntax

expression.DataSource

expression   A variable that represents a MailMerge object.

Return Value
MailMergeDataSource

Example

This example displays the path and file name of the data source attached to the active publication.

Visual Basic for Applications
  Sub DataSourceName()
    With ActiveDocument.MailMerge.DataSource
        If .Name <> "" Then _
            MsgBox "The path and file name of the " & _
            "attached data source is : " & vbCr & .Name
    End With
End Sub

See Also