+ Reply to Thread
Results 1 to 21 of 21

Entire Workbook to PDF and more

  1. #1
    Registered User
    Join Date
    09-21-2015
    Location
    south carolin
    MS-Off Ver
    7
    Posts
    41

    Entire Workbook to PDF and more

    Hello everyone,

    1. I need a code that will convert an ENTIRE workbook into one PDF file

    2. I would like it to save to the same location as excel file

    3. I would like it to use the value of "J52" located on the "Information" worksheet as the name of the file

    4. I would like to activate the macro using any keyboard shortcut...... possibly ctrl + shift + d

    Is this possible?




    5. I also use the code listed below to convert an individual worksheet into a pdf. I don't remember where I found it. It works ok now. However, when I use it, the save-as window with the correct file name displays and wants to save it to my documents unless you change it. I would like it do the same thing but the default location be the same as the original excel file. Can someone clean this up and make that work?

    Thanks!

    Please Login or Register  to view this content.
    Last edited by pick-six; 09-21-2015 at 09:57 PM.

  2. #2
    Forum Contributor
    Join Date
    08-15-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    349

    Re: Entire Workbook to PDF and more

    Hi, Welcome to the forum
    Please use code tags. What is the directory of the original excel file?
    Please click the * Add Reputation if this helps
    If solved remember to mark Thread as solved

    "I'm glad to help and this is not meant to sound smart, but either you have super-human vision to see all those controls cleared one by one with the code I posted, or your computer is really slow."

  3. #3
    Registered User
    Join Date
    09-21-2015
    Location
    south carolin
    MS-Off Ver
    7
    Posts
    41

    Re: Entire Workbook to PDF and more

    Quote Originally Posted by Blokeman View Post
    Hi, Welcome to the forum
    Please use code tags. What is the directory of the original excel file?
    The spreadsheet will be used by multiple people so the directory could vary. If the directory has to be defined then I would just rather it save to the desktop. I will try to go back and edit my first post with code tags.

    Thanks

  4. #4
    Registered User
    Join Date
    09-21-2015
    Location
    south carolin
    MS-Off Ver
    7
    Posts
    41

    Re: Entire Workbook to PDF and more

    This code posted by Paul in another thread works great if only it would use a cell value for the filename and had a keyboard shortcut. It saves it to the same directory as the original excel file.

    Please Login or Register  to view this content.
    Last edited by pick-six; 09-21-2015 at 10:07 PM.

  5. #5
    Forum Contributor
    Join Date
    08-15-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    349

    Re: Entire Workbook to PDF and more

    try;
    Please Login or Register  to view this content.
    Read this for keyboard shortcut;https://support.office.com/en-ca/art...3-50e645fe3155
    Last edited by Blokeman; 09-21-2015 at 10:29 PM.

  6. #6
    Registered User
    Join Date
    09-21-2015
    Location
    south carolin
    MS-Off Ver
    7
    Posts
    41

    Re: Entire Workbook to PDF and more

    Thanks Blokeman!!

    That code worked for the entire workbook. It saves the pdf based on the cell value too. However, it now does not save it in the same directory as the original excel file. I'm gettting closer though!
    Last edited by pick-six; 09-21-2015 at 11:04 PM.

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

    Re: Entire Workbook to PDF and more

    For the first part, you could try this.
    Please Login or Register  to view this content.
    You might be able to read through this code to make changes for the single sheet code.
    If not, let us know.

    The shortcut you'll have to do manually
    Developer - Macros - Options

  8. #8
    Registered User
    Join Date
    09-21-2015
    Location
    south carolin
    MS-Off Ver
    7
    Posts
    41

    Re: Entire Workbook to PDF and more

    jolivnaes.....I couldn't get your code to work.

    This code does work but it does not save to the current directory as the it did before I edited it with Blokemans code. It saves it to mydocuments instead.

    Please Login or Register  to view this content.

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

    Re: Entire Workbook to PDF and more

    I made a slight mistake in the previous code. The filename was from the wrong Sheet/Cell Address.
    It works for me.
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    09-21-2015
    Location
    south carolin
    MS-Off Ver
    7
    Posts
    41

    Re: Entire Workbook to PDF and more

    jolivanes,

    Does your code require that I specify the sheet names? I can't get it to work. This spreadsheet has about 15 worksheets. In some instances many of them would not be used so I will need a code that will only convert the worksheets that aren't hidden. When I try to use your code I get an error. I think it is on this line

    Please Login or Register  to view this content.

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

    Re: Entire Workbook to PDF and more

    It helps if all the information is supplied.

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    09-21-2015
    Location
    south carolin
    MS-Off Ver
    7
    Posts
    41

    Re: Entire Workbook to PDF and more

    Jolivanes your code works great and that solved my first problem! Thank you very much for your help. I'm still playing with the second part of my original post. I haven't had any luck getting the Individual worksheet to save in the same directory as the original excel file.

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

    Re: Entire Workbook to PDF and more

    Is that going to be the Active, or visible/open, sheet or a sheet name somewhere in cell in a sheet ?

  14. #14
    Registered User
    Join Date
    09-21-2015
    Location
    south carolin
    MS-Off Ver
    7
    Posts
    41

    Re: Entire Workbook to PDF and more

    Yes.... The active sheet is open and that sheet has a button that starts the macro. I use the same macro many times throughout the workbook but it is only used on the active sheet.

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

    Re: Entire Workbook to PDF and more

    Is the name it will be saved as in Cell N75?

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

    Re: Entire Workbook to PDF and more

    Change the cell reference for the file name as required.
    Please Login or Register  to view this content.
    Or with an InputBox
    Please Login or Register  to view this content.

  17. #17
    Registered User
    Join Date
    09-21-2015
    Location
    south carolin
    MS-Off Ver
    7
    Posts
    41

    Re: Entire Workbook to PDF and more

    Yes it will

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

    Re: Entire Workbook to PDF and more

    Re: "Yes it will"
    Change the cell reference in the first code in post #16 to the right cell address and you should be sailing into the sunset.

    BTW, you might be interested in this article.
    http://www.contextures.com/excel-qui...customize.html
    Last edited by jolivanes; 09-22-2015 at 12:56 PM. Reason: Quick Access Toolbar info added

  19. #19
    Registered User
    Join Date
    09-21-2015
    Location
    south carolin
    MS-Off Ver
    7
    Posts
    41

    Re: Entire Workbook to PDF and more

    It works. Thanks for your help!

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

    Re: Entire Workbook to PDF and more

    Glad we got it working.
    Good luck
    John

  21. #21
    Registered User
    Join Date
    09-21-2015
    Location
    south carolin
    MS-Off Ver
    7
    Posts
    41

    Re: Entire Workbook to PDF and more

    I have been using this code that Jolivanes helped me with for a few months. Is there anyway I can use this same code and attach the pdf to an outlook email. I have a code that works for an individual worksheet but I need one that will convert all active sheets into a pdf then email. This is the code I use to convert the active sheets into a pdf.

    Please Login or Register  to view this content.
    Last edited by pick-six; 03-30-2016 at 02:59 PM.

+ 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. V-Lookup from an entire Workbook
    By CHR15T1N4 in forum Excel General
    Replies: 1
    Last Post: 08-14-2013, 07:14 AM
  2. Replies: 0
    Last Post: 02-14-2012, 12:34 PM
  3. Print Set-Up for Entire Workbook
    By tpearo in forum Excel General
    Replies: 1
    Last Post: 11-19-2008, 03:49 PM
  4. RE: Search Entire Workbook
    By Sloth in forum Excel General
    Replies: 0
    Last Post: 10-14-2005, 01:05 AM
  5. HOW DO I FORMAT AN ENTIRE WORKBOOK ALL AT ONCE?
    By Adrian M in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 11:05 AM
  6. HOW DO I FORMAT AN ENTIRE WORKBOOK ALL AT ONCE?
    By Adrian M in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 07:05 AM
  7. [SOLVED] HOW DO I FORMAT AN ENTIRE WORKBOOK ALL AT ONCE?
    By katie in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  8. HOW DO I FORMAT AN ENTIRE WORKBOOK ALL AT ONCE?
    By katie in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-28-2005, 11:05 AM

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