Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2006

Tip: Looking for answers? Try searching our database.

multiple .doc files conversion to multiple pdf

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JanAdam - 08 Feb 2006 03:21 GMT
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.

Signature

JanAdam

JanAdam - 08 Feb 2006 03:44 GMT
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?

Signature

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
[quoted text clipped - 23 lines]
>
> Your help will again be much appreciated.
Jezebel - 08 Feb 2006 04:55 GMT
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.

>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
[quoted text clipped - 32 lines]
>
> Your help will again be much appreciated.
JanAdam - 08 Feb 2006 16:15 GMT
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.

Signature

JanAdam

> In the Acrobat set up dialogs (accessible through Acrobat itself or through
> Printer > Properties) you can switch off the 'Prompt for filename' and
[quoted text clipped - 43 lines]
> >
> > Your help will again be much appreciated.
Jezebel - 08 Feb 2006 19:58 GMT
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' ...

> Thank you Jezebel.
>
[quoted text clipped - 68 lines]
>> >
>> > Your help will again be much appreciated.
JanAdam - 08 Feb 2006 23:21 GMT
Jezebel, it works just fine. See my post *mass conversion to PDF* a moment
ago. Many thanks,
Signature

JanAdam

> 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
[quoted text clipped - 73 lines]
> >> >
> >> > Your help will again be much appreciated.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.