How to use VBA in Excel to convert a pdf file to XML? RRS feed

  • Question

  • Hello,

        I need to convert pdf to XML format so that it can be imported into Excel workbook and the information can be extracting out and mapped to existing excel cells. What is the easiest way to get it down without introduce any additional tools/software other than Microsoft products? Client want to keep their process simple and it will be used for many agents in remote locations. They mentioned that they want to use VBA to do it. I could not find much useful information on this. Thanks a lot!


    Wednesday, July 27, 2011 1:41 AM

All replies

  • No Office programs can open a pdf and edit the contents so you will have to get a different app to convert teh pdf into xls format. There are plenty to be found on the web.

    Rod Gill

    The one and only Project VBA Book Rod Gill Project Management
    Wednesday, July 27, 2011 3:55 AM
  • Thanks Rod,


        Your information is useful , however I was asking if I can use VBA to process PDF and convert to xml. Another way might be using VBA to access Adobe's built-in functions such as "save as" directly to get the XML just like manually "save as XML" does in Acrobat software.

    Anyone has an idea?


    Wednesday, July 27, 2011 5:10 AM
  • Quite old thread, but it might be useful for others:

    If you have Adobe Professional on your computer you can try this code to convert PDFs to XMLs (and other formats too) via Excel:

    Monday, February 16, 2015 3:43 PM
  • Adobe Professional ($$$) is the easiest and most direct route.  If you want a free route you can use other tools and access them with VBA using win32 calls.

    Monday, February 16, 2015 4:25 PM