MailMergeDataSource.ConnectString Property (Publisher)
Returns a String that represents the connection to the specified mail merge data source. Read-only.
Syntax
expression .ConnectString
expression A variable that represents a MailMergeDataSource object.
Return Value
String
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