Strangely enough, if I set SourceDoc in the code, it has no problems, like so:
Sub MailMerge() Dim SourceDoc As String
Dim SelectedItems(1) As String
Dim sConnection As String
SourceDoc = "H:\Jonathon Hunter Hill\AirMaster\AirMaster V 0.9.xlsm"
'With Application.FileDialog(msoFileDialogFilePicker)
' .AllowMultiSelect = False
' If .Show <> 0 Then
' SelectedItems(1) = SourceDoc
' Else
' Exit Sub
' End If
'End With
'your connection string, also more easily separated with line breaks and arguments
sConnection = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"User ID=Admin;" & _
"Data Source=SourceDoc;" & _
"Mode=Read;" & _
"Extended Properties=""HDR=YES;IMEX=1;"";" & _
"Jet OLEDB:System database="""";" & _
"Jet OLEDB:Registry Path="""";" & _
"Jet OLEDB:Engine Type=35;" & _
"Jet OLEDB:"
'using your conection string... with the parameter names and the passed values separated nicely
ActiveDocument.MailMerge.OpenDataSource _
Name:=SourceDoc, _
ConfirmConversions:=False, _
ReadOnly:=False, _
LinkToSource:=True, _
AddToRecentFiles:=False, _
Revert:=False, _
Format:=wdOpenFormatAuto, _
SQLStatement:="SELECT * FROM `MailMerge`"
'Connection:=sConnection
'SQLStatement1:="", _
'SubType:=wdMergeSubTypeAccess
'PasswordDocument:="", _
'PasswordTemplate:="", _
'WritePasswordDocument:="", _
'WritePasswordTemplate:="", _
End Sub
But, if I have the user select the source document it fails to execute.