Convert excel spreadsheet to PDF using VBA

Posted on 2006-03-21
Last Modified: 2008-03-10
I have a spreadsheet where i want to save 2 of the X numer of tabs to PDF using VBA. I have Adoboe acrobat 7 installed so to do it manually i just select the sheets and hit the "convert to Adobe PDF" button
Question by:dsvince
    LVL 12

    Expert Comment

    have you tried using excel's macro recorder?

    tools --> macro --> record new macro.

    Author Comment

    Thanks had already tried that but the "Convert to Adobe PDf" did not register in the VBA code. So I need some actual code.
    LVL 5

    Accepted Solution

    If you redo the macro but instead of using Adobe Macro to convert, go to File -> Print -> Adobe PDF, does it work?

    Author Comment

    Thanks, So simple yet so effective, just didnt think to do it that way

    Author Comment

    just for the record the VBA

    Application.ActivePrinter = "Adobe PDF on Ne00:"
        ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
            "Adobe PDF on Ne00:", Collate:=True
    LVL 5

    Expert Comment

    Glad I could help!

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
    This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
    The viewer will learn how to set up a document for the web and print and the recommended PPI for printing.
    The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now