progeCAD support, tips and troubleshooting forum. progeCAD works very similar to some versions of AutoCAD. Moderated.

Moderators: caddit, Moderators

#1782 by ftauto
Fri Jun 15, 2012 9:06 am

How is the best way to print one oer more .pdfs file autmatically using VBA.

Thank you
#1783 by Finite
Fri Jun 15, 2012 10:51 pm
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 PrintTheFileYouWant()
' Print the PDF file
Dim hwnd

Call ShellExecute(hwnd, "Print", ("C:\Documents and Settings\Name of File to Print Here.pdf"), "", "", 0)

End Sub

#1798 by ftauto
Wed Aug 22, 2012 2:06 pm
Hello Thank you

So the name of the plotter ist hwnd.
This plotter must be installed on the local PC.

#1801 by ftauto
Thu Aug 23, 2012 8:05 am
Thank you
I will read it