Printing all word documents in a folder.

S

shd

I have written a macro that will print out all Word documents in a folder.

It works fine!!! All 30 or so files are sent to print in the order required.

Trouble is that the first 10 - 15 files (each a page or so long) go to the
print queue and sit there with a status of "Spooling". The next 10 (all 5 -
10 pages) go to the print queue, process, and start printing. The first 10 -
15 files then sort themselves out and print, followed by the last batch.

I have tried:
- put a delay of up to 20 seconds between each file print request.
- tried foregound vs background printing
- checked print settings for each print file.
- printed to printer and to prn file
- shutting down all unneccasary programs on the PC

All suffer the above problem, but not exactly the same, sometimes only the
first 5 - 10 files will stick in "Spooling" Status !

Anybody have any ideas????

Cheers
 
N

Nick Danger

Can't you just open the folder in Windows Explorer, select all the files you
want to print, then right-click, and select Print?
 
S

shd

Nick Danger said:
Can't you just open the folder in Windows Explorer, select all the files
you want to print, then right-click, and select Print?
This macro is part of a development whereby a tutor can place specify a list
of files in a folder to be printed for a set of course handouts or a manual.
They will be able to specify the number of copies of each file, whether
some will be printed in portrait / landscape , 1 / 2 sided, collated /
uncollated. They will be able to state how many print runs are required and
whether the files are to be collated or uncollated.

I have found snippets and sample code to set up the print management, but if
I can't ensure the order of the printing. all the other bells & whistles are
pretty pointless!
 
J

Jonathan West

shd said:
This macro is part of a development whereby a tutor can place specify a
list of files in a folder to be printed for a set of course handouts or a
manual. They will be able to specify the number of copies of each file,
whether some will be printed in portrait / landscape , 1 / 2 sided,
collated / uncollated. They will be able to state how many print runs are
required and whether the files are to be collated or uncollated.

I have found snippets and sample code to set up the print management, but
if I can't ensure the order of the printing. all the other bells &
whistles are pretty pointless!

This article shows you how to get a list of the files in a folder

Find & ReplaceAll on a batch of documents in the same folder
http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm

Of course, you will want to replace the find/replace code with whatever you
need to do instead.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top