+ Reply to Thread
Results 1 to 2 of 2

Creating individual folders containing selected files that meet a condition

  1. #1
    Forum Contributor
    Join Date
    04-19-2010
    Location
    Manchester
    MS-Off Ver
    Excel 2007
    Posts
    180

    Creating individual folders containing selected files that meet a condition

    Hi

    Have become unstuck so it's back to the board. Quite new to Excel VBA so am hoping this problem is fairly easy for someone else?


    I have some selected papers that are PRINTED out if a candidate scores <=50% (on that topic). Each candidate receives (the 1st) 5 <=50% topic papers on the candidate sheet.

    I am trying to, instead of printing (due to printer problems), to SAVE the 5 topic papers along with the candidate template sheet (which is an excel sheet not a pdf file), in individual folders. Each folder would simply be named as the candidate's name. Each candidate folder should contain 5 pdf topic files with the candidate sheet. Ideally I would want the candidate sheet as a pdf file as well. The alternative here would be to create just one folder with all the candidate files but this would have to be sorted so that I know which files belong to which candidate.


    I am not sure, as I am new to VBA, whether I could tweak the code below (thanks to muad) to "save" instead of "print".

    Call apiShellExecute(Application.hwnd, "print", cell.Value, vbNullString, vbNullString, 0)


    Or should I be looking at looping through with something like

    MkDir "C:\" & Range("F1").Value

    Any help would be greatly appreciated. Files attached.
    Attached Files Attached Files
    Last edited by technik; 01-10-2019 at 01:38 PM.

  2. #2
    Forum Contributor
    Join Date
    04-19-2010
    Location
    Manchester
    MS-Off Ver
    Excel 2007
    Posts
    180

    Re: Creating individual folders containing selected files that meet a condition

    Can anyone help?

+ 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] Creating new files and folders
    By LAVA2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-26-2014, 03:41 PM
  2. macro for auto creating folders from selected cells
    By 9d1awd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-17-2014, 10:58 PM
  3. Move selected files to folders the correspond to file names
    By autbadass in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-11-2013, 09:59 PM
  4. [SOLVED] count number of cells which meet a particular condition for an individual
    By rohit43 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-18-2013, 11:20 AM
  5. Archiving Files - Creating New Folders and Moving Files
    By mccrimmon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-17-2011, 06:47 AM
  6. Replies: 0
    Last Post: 03-29-2011, 03:10 PM
  7. Creating individual files for each row
    By szuyuk in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-11-2007, 11:21 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