|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
老师,下面那件代码能打印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
Sub 打印PDF()
Shell "RUNDLL32.EXE URL.DLL,FileProtocolHandler " & " C:\Users\Administrator\Desktop\DY-TCHX00001-质保书PDF", vbMaximizedFocus
ShellExecute Application.hwnd, "Print", "C:\Users\Administrator\Desktop\DY-TCHX00001-质保书PDF", vbNullString, vbNullString, 0
ShellExecute Application.hwnd, "Print", "C:\Users\Administrator\Desktop\DY-TCHX00001-质保书PDF\2.pdf", "", "", 1
End Sub
|
|