multiple .doc files conversion to multiple pdf

J

JanAdam

I need to create many PDF files from many Word and Power Point documents. I
have Acrobat 6.0, Office 2003 pro installed under W2K pro (can have Adobe CS
with the newest Acrobat). In Acrobat 6, there is an option of converting many
files into a single PDF. But I need to convert them one to one. I thus think
I have to do it via vba code, but run into problems.

Following hints from this group I can loop through all the files I need to
convert via:

For Each filFile In fdrFolder.Files
strFileName = fso.GetFileName(filFile)

‘code to convert strFileName to PDF

Next filFile

I am not sure what should be the command to do the conversion. When recorded
a macro to see how it is done, I see that it does not use the file name at
all, but this is a single file conversion from an active word document. Also,
the Acrobat is asking for accepting to save the new file as whatever, which I
would like to automate as well. I have over two hundred files to convert. I
would like to do it like filename1.doc -> filename1.pdf and so on. If the PDF
files could go to a different folder than the source folder it would be nice,
but this is can easily be done manually or via a macro that I think I can
write.

Your help will again be much appreciated.
 
J

JanAdam

I think can do this

For Each filFile In fdrFolder.Files
strFileName = fso.GetFileName(filFile)

Documents.Open FileName:= strFileName
Application.Run MacroName:="AdobePDFMakerA.AutoExec.Main"
Application.Run MacroName:="AdobePDFMakerA.AutoExec.ConvertToPDF"

And so on, but it will still ask for approval to save files


Any comments please?
 
J

Jezebel

In the Acrobat set up dialogs (accessible through Acrobat itself or through
Printer > Properties) you can switch off the 'Prompt for filename' and
'Display created PDF' options. If you do this, the PDF is automatically
written to the same folder as the Word document, with the same name,
extension pdf.

You can also make Acrobat the default printer.

Then, if all the Word documents are in the same folder, you can select them
all in Windows Explorer, right-click, and select Print.
 
J

JanAdam

Thank you Jezebel.

After setting PDF as a default printer and disabling PDF prompts I can
convert a .doc to .pdf, via *convert to pdf* command from within Word
application, indeed without PDF asking for any actions. However, I cannot do
it via *print*, regardless if started from Windows Explorer of from Word, and
if a single or multiple files are selected. It comes with a message that an
error has occurred (no error number) and then that it cannot open the log
file. It shows the path for the log as, say
D:/Acrobat/Distiller/Mydocuments/filename.log , however there is no
Mydocuments folder created.
 
J

Jezebel

That might be a clue to the problem. There is a default target folder for
batch PDF conversions, stored somewhere in those property dialogs. The
folder should exist already, but by the sounds of it, it doesn't. Try
creating 'D:/Acrobat/Distiller/Mydocuments' ...
 
J

JanAdam

Jezebel, it works just fine. See my post *mass conversion to PDF* a moment
ago. Many thanks,
 

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