Thanks to Jean-Guy Marcil’s entry last May, I just tweaked his
OpenAcrobatFile code to get your answer.
Place the following “paragraph” at the top of the module:
Private Declare Function ShellExecute 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
The code below is its own sub that does the actual work
Public Sub PrintPDF(strFile As String)
ShellExecute 0, "print", strFile, vbNullString, vbNullString, 9
End Sub
Now, in your actual “macro” subroutine, place the following line:
PrintPDF "C:\[FilePathHere]\[DocNameHere].pdf"
> I would like to set up a macro that prints a PDF document to whatever the
> default printer is that the user has.
[quoted text clipped - 5 lines]
>
> Thank you for any suggestions.