Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PDF shell - batch opener

Status
Not open for further replies.

jacDaRippa1

Programmer
Dec 29, 2011
2
0
0
AU
Hello,

Im wanting to write a basic VB application that will allow the user to select a bunch of PDF files then print them in bulk. I have achieved something similar with Microsoft Excel, using the shell command to do this. (ie, VB app allowing users to select a bunch of .xls files and batch them to print in Excel using a shell)

Furthermore, it woul dbe nice to be able to pass in parameters to specify the papersize, orientation etc. is that at all possible?

Is there something similar to the shell command for Adobe Acrobat?

Thanks,

Jac
 
Hello,

So i have a way around it, im using the shellexecute, as seen by the following:

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 Me.hwnd, "print", "c:\etc.pdf", vbNullString, vbNullString, SW_SHOW

My next question is, can i specify printing parameters when using this? im particulary interested to specify the paper orientation and paper size?

Thanks,

Jac
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top