PC Review


Reply
Thread Tools Rate Thread

automate printing

 
 
Agostino Sclauzero
Guest
Posts: n/a
 
      15th Apr 2008
A customer creates a lot of pdf documents via his accounting software.
All pdf files go into a folder, i want to create a simple batch that sends
to a specific printer) all of them.

If i create an .lnk to the printer and i copy the file onto it via shell it
works just fine.
Is there a way to script this?

thanks in advance
Agostino

 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      15th Apr 2008

"Agostino Sclauzero" <(E-Mail Removed)> wrote in message
news:3441764A-5AF3-4A3A-AB57-(E-Mail Removed)...
>A customer creates a lot of pdf documents via his accounting software.
> All pdf files go into a folder, i want to create a simple batch that sends
> to a specific printer) all of them.
>
> If i create an .lnk to the printer and i copy the file onto it via shell
> it works just fine.
> Is there a way to script this?
>
> thanks in advance
> Agostino


I'm not aware of any command line switches for Acrobat that
would let you do this. You could use the macro written in VB
Script - see below. Instructions are at the start of the code.

To avoid the perennial problem caused by lines getting broken
up by your newsreader, use this link to get an intact copy of
the code below:
http://www.hotlinkfiles.com/files/12...intacrobat.vbs


'-------------------------------------------------------
'Print all Acrobat files located in the specified folder
'
'Save this file as c:\Windows\PrintAcrobat.vbs, then
'create this shortcut on the desktop:
'cscript.exe //nologo c:\Windows\PrintAcrobat.vbs
'
'Remember to adjust the values for "FolderName" and
'"Acrobat" to suit your own environment.
'
'Note that this program, like all macros, is not robust.
'It can easily fail due to unexpected events such as a
'virus scanner pop-up.
'
'15.4.2008 FNL
'-------------------------------------------------------
Const Acrobat = "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe"
Const FolderName = "d:\temp"
Const delay = 5

Set objWS = WScript.CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(FolderName)

For Each objFile In objFolder.Files
If Right(UCase(objFile.name), 4) = ".PDF" Then
objWS.Exec Acrobat & " " & FolderName & "\" & objFile.Name
WScript.Sleep(1000 * delay)
objWS.SendKeys "%FP{Enter}"
WScript.Sleep(1000 * delay)
objWS.SendKeys "{Enter}"
WScript.Sleep(2000 * delay)
objWS.SendKeys "%FX"
End If
Next


 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      15th Apr 2008

"Agostino Sclauzero" <(E-Mail Removed)> wrote in message
news:3441764A-5AF3-4A3A-AB57-(E-Mail Removed)...
>A customer creates a lot of pdf documents via his accounting software.
> All pdf files go into a folder, i want to create a simple batch that sends
> to a specific printer) all of them.
>
> If i create an .lnk to the printer and i copy the file onto it via shell
> it works just fine.
> Is there a way to script this?
>
> thanks in advance
> Agostino
>


Sorry, wrong link. Use this one:
http://www.hotlinkfiles.com/files/12...intacrobat.vbs


 
Reply With Quote
 
Bob I
Guest
Posts: n/a
 
      16th Apr 2008
Maybe this, it's a start.

"C:\Program Files\Adobe\Acrobat\Acrobat.exe" /p /h "%1"

Agostino Sclauzero wrote:

> A customer creates a lot of pdf documents via his accounting software.
> All pdf files go into a folder, i want to create a simple batch that
> sends to a specific printer) all of them.
>
> If i create an .lnk to the printer and i copy the file onto it via shell
> it works just fine.
> Is there a way to script this?
>
> thanks in advance
> Agostino
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automate printing JeffH Microsoft Excel Misc 3 28th Mar 2008 07:48 PM
How do I automate printing ... =?Utf-8?B?QmlnLUQ=?= Microsoft Excel Programming 0 1st Sep 2006 05:19 PM
automate printing =?Utf-8?B?Sm9obg==?= Microsoft Access Getting Started 1 13th Feb 2005 10:11 AM
automate printing mshobe Microsoft Excel Discussion 1 27th Feb 2004 10:39 PM
Automate printing. Some help please! chickooooos Microsoft Excel Programming 2 30th Dec 2003 12:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:21 AM.