I want to loop through a directory of excel files and insert pictures from another directory that goes down the line of excel files and inserts the pictures one after the other in the picture directory.
Below is the code to help show what I mean. I want the insert picture to be on the Signature tab pulling from the mwh-fs1\Users\xxxx\xxxx\xxxxx\xxxxx\SKM_C55818082107260_001.jpg where the 001 at the end is the scanned picture. I want this number to change from 002, 003, 004, etc. up through like 200. I would like it to go into a different directory, start at the top of that directory and go down and insert the pictures but increase by 1 every time as they're different scanned pictures for the individual file. These are reconciliations that we scan the official signed one in and have to insert the signed reconciliations into the excel files reconciliation. This macro would allow me to press a button and save me a lot of time. I will need to get the pictures in the correct order to match the order of the excel file reconciliations but that's minimal time compared to how I have been doing it. One by one, inserting picture, finding said picture in the directory, pressing insert and then saving and closing. I would like to have it automatically do this and save and close and just loop through the entire excel file directory.
Below is the code to help show what I mean. I want the insert picture to be on the Signature tab pulling from the mwh-fs1\Users\xxxx\xxxx\xxxxx\xxxxx\SKM_C55818082107260_001.jpg where the 001 at the end is the scanned picture. I want this number to change from 002, 003, 004, etc. up through like 200. I would like it to go into a different directory, start at the top of that directory and go down and insert the pictures but increase by 1 every time as they're different scanned pictures for the individual file. These are reconciliations that we scan the official signed one in and have to insert the signed reconciliations into the excel files reconciliation. This macro would allow me to press a button and save me a lot of time. I will need to get the pictures in the correct order to match the order of the excel file reconciliations but that's minimal time compared to how I have been doing it. One by one, inserting picture, finding said picture in the directory, pressing insert and then saving and closing. I would like to have it automatically do this and save and close and just loop through the entire excel file directory.
Code:
OPEN_INSERT_PIC Macro'
' Keyboard Shortcut: Ctrl+Shift+Q
'
Sheets("Signature").Select
Range("A1").Select
ActiveSheet.Pictures.Insert( _
"\\mwh-fs1\Users\xxxx\xxxx\xxxxx\xxxxx\SKM_C55818082107260_001.jpg" _
).Select