This topic has not yet been rated - Rate this topic

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



Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.