VBA: Create Folder and Add Documents According to Excel Unique ID

Kiss the Krogan

New Member
Joined
Sep 19, 2019
Messages
2
Hi Everyone,

I've done some searching but am not getting anywhere with my requirements. I am hoping someone can help.

I have a Power Query which identifies new members. These members need cards printed and there are two files the printer needs: the new member photo and the new member signature.

In the report/query I have a unique ID column (named "Temporary Number"). I also have a column identifying the Print Batch we are currently working on.

All of the application documents live in a central location on SharePoint and each individual folder is named with the Temporary number.
Each document in the folder is identified with the temporary number and the type of document it is. For example T10000_SIG.JPG is the signature file and T10000_PHOTO.JPG is the picture of the new member.

/00 Documents/T10000/T10000_SIG.JPG
/00 Documents/T10000/T10000_PHOTO.JPG
/00 Documents/T10001/T10001_SIG.JPG
/00 Documents/T10001/T10001_PHOTO.JPG

The complete path would look something like this:

https://mycompany.sharepoint.com/sites/CRORegionalandHomeOffices/CRO Database/Regional Offices/00 Documents/[Temporary Number]/[Temporary Number]_SIG.JPG.

Here is what I need the code to do:
1) I need it to create a new folder named after the current print batch
2) Using the Temporary Number in the current query/report, I need it to collect the 2 required documents from their folders (Temporary Number_SIG.JPG and Temporary Number_PHOTO.JPG) and copy them to the new, Print Batch folder it just created.

Here is where I need the new folder created and stored:

https://mycompany.sharepoint.com/sites/CRORegionalandHomeOffices/CRO Database/Administration/CRO Card Ordering/Print Batches/


I hope this makes sense to everyone and I am hoping someone can help!


KTK
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Forum statistics

Threads
1,213,482
Messages
6,113,908
Members
448,532
Latest member
9Kimo3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top