+ Reply to Thread
Results 1 to 2 of 2

Excel 2007 VBA to Export Sheet as PDF doesn't work in 2013

  1. #1
    Registered User
    Join Date
    02-03-2010
    Location
    new york
    MS-Off Ver
    Excel 2003
    Posts
    25

    Excel 2007 VBA to Export Sheet as PDF doesn't work in 2013

    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

    ActiveSheet.ExportAsFixedFormat _
    Type:=xlTypePDF, _
    Filename:=Fname
    Backgrounder:
    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!

  2. #2
    Registered User
    Join Date
    02-03-2010
    Location
    new york
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Excel 2007 VBA to Export Sheet as PDF doesn't work in 2013

    Just to add a few more details, I"ve tried a 3 or 4 different variations of the code I've found in books or through google. My original code which worked beautifully in 2003:
    fn = "C:\Users\myname\Desktop\mergefolder\" & mycount
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
    fn, Quality:=xlQualityStandard, IncludeDocProperties:=False, IgnorePrintAreas:=False, OpenAfterPublish:=False

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel to Word macro doesn't work on Word 2013 if sheet is hidden (works fine on 2010)
    By dreddster in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-29-2015, 04:37 AM
  2. [SOLVED] XLSM with excel 2013 does not work with 2007
    By rodich in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-23-2015, 04:40 AM
  3. Replies: 2
    Last Post: 05-27-2014, 10:21 AM
  4. Works in Excel 2007, does not work in 2013
    By froggy50 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-06-2014, 06:42 AM
  5. Updating broken links doesn't work - Excel 2013
    By kartoshka in forum Excel General
    Replies: 0
    Last Post: 10-25-2013, 05:11 AM
  6. Excel 2007 : excel 2003 add-in doesn't work in 2007
    By rhinoceros in forum Excel General
    Replies: 5
    Last Post: 05-06-2009, 07:42 PM
  7. Why doesn't this code work for Excel 2007?
    By colwyn in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-31-2008, 06:55 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1