Option
Explicit
#If Win64 Or VBA7 Then
Private
Declare
PtrSafe
Function
ShellExecuteA
Lib
"Shell32.dll"
( _
ByVal
hwnd
As
LongPtr, _
ByVal
lpOperation
As
String
, _
ByVal
lpFile
As
String
, _
ByVal
lpParameters
As
String
, _
ByVal
lpDirectory
As
String
, _
ByVal
nShowCmd
As
Long
)
As
LongPtr
#Else
Private
Declare
Function
ShellExecuteA
Lib
"Shell32.dll"
( _
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
#End If
Sub
Dialog_Print_Out()
Dim
res
With
Application.FileDialog(msoFileDialogFilePicker)
.Show
res = ShellExecuteA(0&,
"printto"
, .SelectedItems(1), Chr(34) &
"Soda PDF Desktop 12"
& Chr(34), vbNullString, 0&)
End
With
End
Sub