+ Reply to Thread
Results 1 to 5 of 5

VBA Script to Save as Adobe PDF

  1. #1
    Forum Contributor
    Join Date
    12-14-2005
    Location
    US
    MS-Off Ver
    Excel 2019, Excel 365, Excel Mobile (Android)
    Posts
    145

    VBA Script to Save as Adobe PDF

    I have a worksheet with 8 tabs. I have set up print macros to print each tab with no problems. However, what I would like to do is to be able to save to PDF 3 of the tabs.
    The 3 tabs are: Master, RPT_Receipts, RPT_WrkSht.
    Going through the process manually I would:
    GOTO File > Select: Save as PDF > Enter.
    A box opens to select the sheets: Master, RPT_Receipts, RPT_WrkSht >Select: Convert to PDF.
    A box opens that says it needs to save file before continuing. Select Yes.
    A box opens asking if i want to continue. Select Yes.
    A box opens to save PDF File As: I save it to the desktop.

    Is there VBA script to automate all this that I can then run as a macro command? As always any help would be appreciated.

  2. #2
    Forum Contributor
    Join Date
    04-16-2020
    Location
    Alberta, Canada
    MS-Off Ver
    365
    Posts
    216

    Re: VBA Script to Save as Adobe PDF

    I have code that opens a user form, fills the form in dynamically with all the names of the tabs and checkboxes. you select the ones you want to save and click the save button. It saves the pdf in the document directory, but you can modify it to fit your needs, and add the save feature if you want



    The first one is for when you open a user form, it grabs the names of the tabs and lays them out on the form. this form is what you have the button for the first macro, other than that, the form self fills
    The second one creates the checkboxes to associate with the tab names.
    The third one centers the user form on the monitor
    The last one is for the printing after you have selected the checkboxes

    Or something like that....

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,525

    Re: VBA Script to Save as Adobe PDF

    Change the save name, here "3_Sheets" as required.
    It assumes that the print ranges have been set.
    Please Login or Register  to view this content.
    Experience trumps academics every day of the week and twice on Sunday.

  4. #4
    Forum Contributor
    Join Date
    12-14-2005
    Location
    US
    MS-Off Ver
    Excel 2019, Excel 365, Excel Mobile (Android)
    Posts
    145

    Re: VBA Script to Save as Adobe PDF

    jolivanes the script seemed to work on execution saving the file. However on opening the file Adobe reported the file as damaged and it would no t open. I have Adobe Pro. Any ideas on how to resolve the issue?

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,525

    Re: VBA Script to Save as Adobe PDF

    I don't have Adobe Pro. I just use the reader and that works OK.
    Maybe someone with the Adobe program installed can help you.
    Does the code from Post #2 work for you?
    If you right click on the file and use "open with", do you have another option there?

+ 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. Save as Adobe PDF
    By anand_palani in forum Excel General
    Replies: 1
    Last Post: 08-18-2017, 05:19 AM
  2. Save as Script
    By Lonney in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-01-2015, 08:32 PM
  3. [SOLVED] "Save as PDF" exports to old version of Adobe
    By Zantax in forum Excel General
    Replies: 2
    Last Post: 10-26-2012, 03:02 AM
  4. 'Save as Adobe PDF' Button
    By swordswinger710 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-02-2012, 12:37 PM
  5. Adobe PDF ActiveX : shame on Adobe..!
    By Sepro in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-05-2006, 04:10 PM
  6. [SOLVED] when i save xls file, debug script is running and canno't save fil
    By Imtiaz in forum Excel General
    Replies: 1
    Last Post: 07-16-2005, 11:05 AM
  7. [SOLVED] I need an excel plug in to save workbooks in adobe acrobat format
    By chris brown in forum Excel General
    Replies: 1
    Last Post: 06-22-2005, 08:05 PM

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