I am currently using ShellExecute to print PDF using the code below.
PDF is printed with other (Word) documents. However, I need them to print in a specific order, which is a problem because PDF files take longer to send.
Is there a way to check if a PDF has been sent to the printer before proceeding to the next line of code?
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
ShellExecute Application.hwnd, "Print", formPath, 0&, 0&, 0&`
source
share