Information générale
Catégorie:
COM/DCOM et OLE Automation
Troy:
We are doing, what appears to be a very similar thing with Adobe Acrobat Reader. Acrobat reader can be automated via the command line which, in turn, can be directed anywhere you wish. The following sample is how we are printing pdf files automatically to different printers throughout the organization.
oShell = CreateObject( "WScript.Shell" )
oShell.Run( "ACRORD32.EXE /t cFile cPrinter cDriver cPort" )
The 4 parameters are intuitively named for your reference. You may have to do a bit of looking for your printer information to get it right. You can also peek in the registry to get the values for the printer also.
Hope this helps.
P.S. - dont forget to enclose any parameter values in quotes should the names contain spaces.
P.P.S - If the createobject fails, ensure that the standard support libraries you need are registered. This one got us. You can find info on this by searching for WScript.Shell
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement