|
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
Sub test()
Shell "C:\Program Files (x86)\Foxit Software\Foxit Reader\FoxitReader.exe /p " & CurrentProject.Path & "\报表1.pdf", vbHide
End Sub
把里面的路径改为你的PDF阅读器路径(我的电脑装不了ADOBE的PDF阅读器)和文件名,批量处理时,加上文件夹的循环语句(GetFolder.Files等等),由于我的电脑没有连接打印机,只能用XPS Document Viewer,看不到效果。 |
|