loop through folder and print to PDF

J

Jeff C

I would like to use WORD to loop through a folder of ASCHii documents
printing them to PDF files in the same folder. I use WORD 2003 and Adobe ver
5 with PDF maker and Distiller installed. Any chance there are VBA tools to
build this process? Any suggestions and/or pointers to resources will be
appreciated.

Thanks in advance.
 
G

Gordon Bentley-Mix

Jeff,

Have you considered the "low-tech" solution of perhaps simply selecting all
of the documents in the folder and choosing "Print" from the right-click
menu? You would, of course, have to configure Adobe PDF as the printer in
Word and ensure that Word is the application associated with ASCii documents.

The drawback is that Adobe would probably prompt you for the file location
of every file, but you might possibly face the same challenge with any sort
of VBA solution anyway. (Depends on how well Adobe v5 can be driven with VBA,
but if the latest version is any indication, I wouldn't hold my breath.)

And even if you could automate the process to work around this drawback, the
time you'd spend to develop the automation might be more than the time you'd
spend clicking the "Save" button in the "Save PDF File As" dialog. Besides,
isn't this what office juniors are for? ;-P

I guess what it really comes down to is how many files you have to print and
how often you might need to do this job. If there are a lot of files and you
have to do it frequently, then automation makes sense. Otherwise...
-----
Cheers!

Gordon

Uninvited email contact will be marked as SPAM and ignored. Please post all
follow-ups to the newsgroup.
 
G

Gordon Bentley-Mix

Jeff,

After further consideration, I realised I may have led you astray. It may be
enough to simply set Adobe as your default printer and take Word out of the
equation entirely. My apologies for the misdirection. It may have been a case
of "to a man with a hammer, everything looks like a nail" - but you _did_ say
you wanted to use Word, and this _is_ the Word programming forum...

Of course, this is assuming that my suggested "low tech" solution will meet
your requirements.
-----
Cheers!

Gordon

Uninvited email contact will be marked as SPAM and ignored. Please post all
follow-ups to the newsgroup.
 
J

Jeff C

--
Jeff C
Live Well .. Be Happy In All You Do


Gordon Bentley-Mix said:
Jeff,

After further consideration, I realised I may have led you astray. It may be
enough to simply set Adobe as your default printer and take Word out of the
equation entirely. My apologies for the misdirection. It may have been a case
of "to a man with a hammer, everything looks like a nail" - but you _did_ say
you wanted to use Word, and this _is_ the Word programming forum...

Of course, this is assuming that my suggested "low tech" solution will meet
your requirements.


Approx 160 reports each month have been individually opened and manually
printed to Distiller to save them each as PDF files for Audit purposes. As
they are ASCHii and not postscript which is required for Adobe PDF, I thought
that running them each through WORD would be a solution and also afford a VBA
solution. Once a VBA solution is found that gives me the ability to schedule
the process and take the manual effort out of the equation. Thanks for your
thoughts though I still think there must be a solution.

Cheers to you Gordon
 
G

Gordon Bentley-Mix

Definitely worth the effort to automate then...

I don't have any suggestions myself, but you may find something to help get
you started in Greg Maxey's "Process All Files in a Batch Folder" page:
http://gregmaxey.mvps.org/Process_Batch_Folder.htm.

However, I still think you may run into problems with Adobe prompting for
the file name for each of the ~160 reports.
-----
Good luck!

Gordon

Uninvited email contact will be marked as SPAM and ignored. Please post all
follow-ups to the newsgroup.
 
D

Doug Robbins - Word MVP

If you change the setting in Adobe so that it does not prompt for the file
name, it will by default assign the same filename as the original doucment
with a .pdf extension.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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