+ Reply to Thread
Results 1 to 4 of 4

Macro that will print/save as PDF with file name a cell, replace cell and repeat

  1. #1
    Forum Contributor
    Join Date
    10-15-2013
    Location
    Calgary, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    218

    Macro that will print/save as PDF with file name a cell, replace cell and repeat

    Hello,

    Please see attached example.

    I have a cell E8 that is a employee number. I would like a macro that printed (or saved) as a pdf the "Overview" page. The printed (or saved) file needs to be the employee number in E8.

    After printing (or saved) to replace cell E8 with the next number on the "Numbers" Sheet and repeat the process.

    Here are the first 5 examples:

    AAC00047586
    AAC00027455
    AAC00026590
    AAC00056862
    AAC00045062

    I would want the number in E8 replaced by each of these and the file names to match the information inside like this...

    AAC00047586.pdf
    AAC00027455.pdf
    AAC00026590.pdf
    AAC00056862.pdf
    AAC00045062.pdf

    Thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,009

    Re: Macro that will print/save as PDF with file name a cell, replace cell and repeat

    .
    This is one way. Paste macro into a Routine Module.

    Please Login or Register  to view this content.
    Requires a folder on your desktop (edit the path in the macro to match your desktop) named : EMPLOYEES
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    10-15-2013
    Location
    Calgary, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    218

    Re: Macro that will print/save as PDF with file name a cell, replace cell and repeat

    Quote Originally Posted by Logit View Post
    .
    This is one way. Paste macro into a Routine Module.

    Please Login or Register  to view this content.
    Requires a folder on your desktop (edit the path in the macro to match your desktop) named : EMPLOYEES
    This worked perfectly! Thanks!

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,009

    Re: Macro that will print/save as PDF with file name a cell, replace cell and repeat

    .
    You are welcome.

+ 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. Export Pre-selected Rows to Macro-enabed File, Save the file, Print it as PDF.
    By N1ka in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 04-03-2018, 08:07 PM
  2. Print/Save to .pdf using a Macro that references a range/cell
    By WithinTheLight in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-28-2018, 08:46 AM
  3. [SOLVED] Macro to open Excel file, run other macros save, and close file & repeat.
    By Ronnet2 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-08-2015, 09:47 AM
  4. [SOLVED] VBA - Help with Macro to Copy, Paste, Save, Print and Repeat
    By DJF25 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 11-13-2014, 12:30 PM
  5. Replies: 0
    Last Post: 01-29-2014, 01:45 PM
  6. Increase cell by 1, print as PDF and save PDF with that cell number as file name
    By eldred100 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-13-2012, 09:39 AM
  7. Inputting Value from column to cell, print, repeat with next cell
    By mdidrickson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-25-2012, 10:24 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