Problem: simple/proven VBA code to export excel sheet to pdf no longer works in Excel 2013. Worked for years in Excel 2007.
Runtime Error 5
Backgrounder:ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=Fname
Our company just moved from Excel 2007 directly to Excel 2013 (win 7 32 bit).
I have a workstream that produces about 100 pdf files through dynamic templates.
Each pdf represents one report and I use a freeware to easily merge all the files into 1 pdf for printing (simpler than Adobe Acrobat Pro).
With Excel 2013 I'm using Acrobat Pro XI.
Attempts to Resolve:
I can manually convert a sheet to pdf using the Acrobat menu from the Ribbon or the File Save as PDF under the File menu.
This would seem to indicate that the Adobe PDF Maker Com addin is fully functional.
However I can no longer automate this simple process thru VBA.
I have reinstalled Acrobat Pro, Repaired Acrobat Pro, Repaired Office 2013. To no avail.
I deleted the addin from its folder and started Excel. It told me the Addin was dead and asked if I wanted to install it. I went ahead but still the code doesn't work.
There isn't way in hell I can create my 100 page report manually. It takes me 5 seconds to run thru VBA, it would take quite a few hours manually.
There are lots of reports of this on Google, but no solutions. In most cases I"ve read the addin work. Mine does, but only manually.
Thanks!
Bookmarks