'Initialize Acrobat by creating App object. MsgBox "The input file is not a PDF file!", vbCritical, "File Type Error" MsgBox "Cannot find the PDF file!" & vbCrLf & "Check the PDF path and retry.", _ 'C:Program FilesAdobeAcrobat xx.0Acrobatacrobat.tlb 'Alternatively you can find it Tools -> References -> Browse and check for the path 9.0 or 10.0) you have installed to your PC. 'on your Acrobat Professional version (i.e. 'Go to Tools -> References -> Adobe Acrobat xx.0 Type Library, where xx depends 'In order to use the macro you must enable the Acrobat library from VBA editor: 'Saves a PDF file as another format using Adobe Professional. Sub SavePDFAsOtherFormat(PDFPath As String, FileExtension As String) The code actually uses the Save As command of Adobe Professional to save the files to the desired format. Then you can use the attached workbook to convert them to a different format. So, if you have a folder that contains PDF files, you can use this tool to obtain their file paths. ![]() ![]() So, if you have installed Adobe Professional on your computer and you need to convert some PDF files into Word files, for example, take a look at the code below.Īpart from the primary procedure, I also wrote a loop to convert multiple PDF files at once. The method that I wrote requires Adobe Professional to work. I started thinking about his question, and I thought it could be quite useful to automate the procedure of saving a PDF file into another format. A couple of days ago, Peter asked me on this post if it is possible to save a PDF file as an Excel table by using VBA.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |