Evidently you haven't read what's in the link. The whole point about cross-posting etiquette that you'll read there is that the forums aren't linked and, by not applying the etiquette (which amounts to nothing more than common courtesy), you could end up having different people working on the same issue, possibly unnecessarily traversing the same ground and maybe even working at cross purposes.
As for:
there's not much point in defining and selecting a source document, then not using it!I think the problem is that I've gotand it doesn't like how I've got SourceDoc as an input. This can't be avoided, due to the nature of how the program will be used.ActiveDocument.MailMerge.OpenDataSource _ Name:=SourceDoc, _
I've got it working like this:
But it's not acceptable for me to have the source in there, as I've said.Sub MailMerge() Dim SourceDoc As String '... 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=""H:\Jonathon Hunter Hill\AirMaster\AirMaster V 0.9.xlsm"";" & _ '... Name:="H:\Jonathon Hunter Hill\AirMaster\AirMaster V 0.9.xlsm", '... End Sub
Your two references to:
"H:\Jonathon Hunter Hill\AirMaster\AirMaster V 0.9.xlsm"
should be replaced with:
SourceDoc