Separate Print routine. This in a new code-module:
Declare Function apiShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _
ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) _
As Long
Public Sub PrintFile(ByVal strPathAndFilename As String)
Call apiShellExecute(Application.hwnd, "print", strPathAndFilename, vbNullString, vbNullString, 0)
End Sub
Sub PrintPDFfiles()
Dim fNameAndPath As Variant, wb As Workbook
fNameAndPath = Application.GetOpenFilename(FileFilter:="Pdf Files (*.pdf), *.pdf", Title:="Select File(s) To Be Printed", MultiSelect:=True)
If IsArray(fNameAndPath) Then
For Each pdf In fNameAndPath
PrintFile pdf
Next pdf
End If
End Sub
and run PrintPDFfiles.
You can select multiple files to be printed using mouse left-clicks and the Shift and/or the Ctrl key.
The reason for saying a new code-module is actually only so that the
Declare Function apiShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _
ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) _
As Long
is in the Declarations area of the code-module