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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for