Share via


ConnectString Property [Publisher 2003 VBA Language Reference]

Returns a String that represents the connection to the specified mail merge data source. Read-only.

expression.ConnectString

expression Required. An expression that returns a MailMergeDataSource object.

Example

This example checks if the connection string contains the characters OLEDB and displays a message accordingly.

Sub VerifyCorrectDataSource()

    With ActiveDocument.MailMerge.DataSource
        If InStr(.ConnectString, "OLEDB") > 0 Then
            MsgBox "OLE DB is used to connect to the data source."
        Else
            MsgBox "OLE DB is not used to connect to the data source."
        End If
    End With

End Sub

Applies to | MailMergeDataSource Object