Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch Convert Doc to PDF

Status
Not open for further replies.

lb1

Technical User
Apr 19, 2002
109
US
I am using acrobat 4.0. Is there a way to batch convrt a full folder of .Doc files to .Pdf files.
If not possible with version 4.0, is it possible if I update to the current version?
Thanks in advance.
Louis
 
If you are using 4.0 you are in luck. With acrobat 4.0 adobe gave the user the ability to simply drop a word doc file into the window and it would convert it. In 5.0 they have removed this function for Microsoft Office. If you want to code something to automate this you can modify the following tif2dpf code (which will work with tiff, xls, doc, ppt):

Private Sub Tif2PDF(filename As String)
'pass the full path of the .tif file to this function

Dim AcroApp As CAcroApp
Dim AVDoc As CAcroAVDoc
Dim PDDoc As CAcroPDDoc
Dim IsSuccess As Boolean

Set AcroApp = CreateObject("AcroExch.App")
Set AVDoc = CreateObject("AcroExch.AVDoc")

Call AVDoc.Open(filename, "")

Set AVDoc = AcroApp.GetActiveDoc

If AVDoc.IsValid Then

Set PDDoc = AVDoc.GetPDDoc

' Fill in pdf properties.
PDDoc.SetInfo "Title", "My Title"
PDDoc.SetInfo "Author", "The Author"
PDDoc.SetInfo "Subject", "The Subject"
PDDoc.SetInfo "Keywords", "Keywords"

If PDDoc.Save(1 Or 4 Or 32, _
App.Path & &quot;\pdf\convertedfile.pdf&quot;) <> True Then
MsgBox &quot;Failed to save &quot; & filename
End If

PDDoc.Close

End If

'Close the PDF
AVDoc.Close True
AcroApp.Exit

'Cleanup
Set PDDoc = Nothing
Set AVDoc = Nothing
Set AcroApp = Nothing

End Sub
 
i'm have the same question for v5. I'm having trouble understaning the steps necessary for modifing the code. I've read the instructions given in the reply but I don't think that my computer skills allow me to perform this task or even beging understanding the steps. If there is a good starting place would you let me know. I would also like to convert multiple doc files to pdfs at one time.

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top