【发布时间】:2015-03-11 20:54:51
【问题描述】:
我目前正在使用 ShellExecute 使用以下代码打印 PDF。
PDF 与其他 (Word) 文档一起打印。但是,我需要它们以特定顺序打印出来,这是一个问题,因为 PDF 需要更长的时间才能发送。
有没有办法在继续下一行代码之前检查 PDF 是否已发送到打印机?
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&`
【问题讨论】:
-
在执行对
ShellExecute的调用之前,您可以随时检查文件的扩展名是否为.PDF。