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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to print an .PDF document to a specified printer using VBscript

Status
Not open for further replies.

jwebbs

Programmer
Mar 27, 2001
2
US
I am trying to print a Pdf document using vbscript and I want to send it a printer of my choosing, not the default printer, and I have no idea how to do it. I tried using create object like this "wscript.createobject(acroRB32.Application)", but it doesn't like it. I really need some help so any ideas or suggestions will be greatly appreciated.

Thanks
 
I would try the following:

set abat = GetObject("c:\path\acrodocument.pdf")

That should get you a Acrobat object.

abat.cAcroAvDoc.printPagesSilent(...) should get something to print out without displaying a box, but I'm not sure how to specify the printer.

You need to use the other methods to get the total pages, etc, to pass to printPagesSilent.

You should create an empty vb project, add an acrobat reference and use the object viewer (F2) to view the properties and methods of the Acrobat object and see if you can glean any useful info.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top