Export (0) Print
Expand All

MailMerge.DataSource Property

Office 2007
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



Community Additions

ADD
Show:
© 2014 Microsoft