+ Reply to Thread
Results 1 to 8 of 8

Save Each Employee Form to PDF

  1. #1
    Banned User!
    Join Date
    09-26-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    607

    Save Each Employee Form to PDF

    Hello all,

    I have a 'Training' sheet with a yes/no column J. There is a macro in place to print out all forms and memos when selected 'Yes' in column J.

    My question is there a way to export each form (not the memo area) for each employee selected 'Yes' to a PDF file so the scaling remains the same as the print out from Excel?

    Thank you very much in advance for your help

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Save Each Employee Form to PDF

    Hi Billy

    I don't know how you wish to incorporate this into your existing Code...for the moment CTRL + q will fire this Code in the attached...
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Banned User!
    Join Date
    09-26-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    607

    Re: Save Each Employee Form to PDF

    Hello,

    Thank you for the code jaslake. I changed the path to my desktop ("C:\Users\Bill\Desktop\") and created a folder 'PDF Files' on my desktop. I then assigned the code to the 'Save Forms and Memo to File' button ( I will change this later to say 'Save Forms as PDF to File').

    I clicked to run the code and the PDFs of the employees set to yes go on the desktop but not in the file I created. Am I doing something wrong? Also I clicked again and there was only one copy of each which is good I suppose. What if these employees have different training forms later? Can the names of the files have an extension of the type of training to the names so they can go in the file also?



    Thank you,
    Billy

    PS I forgot to put the path for the file so the location and format works perfectly. The extension that I requested will come from Type of Training in D8:G16 merged cells. There will be only one line filled out for that training. I appreciate it very much for your help.
    Last edited by Billy Spivy; 01-22-2018 at 07:36 AM.

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Save Each Employee Form to PDF

    Hi Billy

    Replace the Code with this...
    Please Login or Register  to view this content.

  5. #5
    Banned User!
    Join Date
    09-26-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    607

    Re: Save Each Employee Form to PDF

    Brilliant thank you so much.

    How does the code get the names of PDF files? I ask in case I want to perhaps put a hyphen.

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Save Each Employee Form to PDF

    Hi Billy

    How does the code get the names of PDF files? I ask in case I want to perhaps put a hyphen.
    The Code looks in Sheets("Personal Information").Range("A:A") for the Employee Number. If found the Code extracts the Employee Name from the same row, Column B (Offset(0, 1)).
    The Code looks for a non blank Cell in Range("D8:D16") and sets myTraining to that Value.
    The Code then assigns that Name to the File (myFile = empNum.Offset(0, 1) & " " & myTraining).
    If you wished to place a Hyphen in the File Name it would probably be here...myFile = empNum.Offset(0, 1) & " - " & myTraining

    PS...The Code should probably be checking for Illegal Characters in the File Name ("/$:\'<|>*")...if you wish this to be added let me know.
    Last edited by jaslake; 01-22-2018 at 12:28 PM.

  7. #7
    Banned User!
    Join Date
    09-26-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    607

    Re: Save Each Employee Form to PDF

    Great thanks again for the fantastic help!

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Save Each Employee Form to PDF

    You're welcome...glad I could help. Thanks for the Rep.

+ 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. [SOLVED] Macro to save file by employee and save as PDF in path
    By jw01 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-18-2017, 11:39 AM
  2. Macro To save as PDF of employee payslips
    By yemnirmal in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 08-31-2015, 07:59 PM
  3. [SOLVED] Macro To save as PDF of employee payslips
    By svippala in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 08-07-2014, 12:31 AM
  4. EMPLOYEE WARNING FORM
    By dawni in forum Excel General
    Replies: 2
    Last Post: 07-10-2006, 05:39 PM
  5. employee evaluation form
    By Ashley H. in forum Excel General
    Replies: 1
    Last Post: 07-06-2006, 01:00 AM
  6. [SOLVED] employee payment statement form
    By kiltau in forum Excel General
    Replies: 0
    Last Post: 05-31-2006, 04:45 PM
  7. Add Employee / Delete Employee Form questions
    By WinterCoast in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-11-2005, 08:46 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