Solved Import Filepath Batch

Tophan

Registered User.
Local time
Today, 06:44
Joined
Mar 27, 2011
Messages
381
Hello. Is there a way to import several filepaths into an access table? I'll give you more context to this question.

Every week I receive several progress photos from project managers on a construction site for inclusion as an appendix to a weekly report. Right now, I save the photos to a folder which is named the week commencing date, then I import the photos to a Word document, run a macro to resize all photos and then drag them into a table for presentation. This can take anywhere from 15-30 minutes each week, depending on how many photos I receive.

Using Access, I would like to select the weekly folder and import all files in that folder as individual records in a table. That way I can create a photo report in a timelier manner.

Is this possible? If yes, please advise how I can achieve this.

Thanking you in advance for your assistance.
 
There's really no need to import the photos into a table. Access can easily display those photos from the folder on a report. All you need in the table are the filepaths. Take a look at Similar Threads below to see previous discussions on this topic.
 
Oh yes. I understand that. I don't want to import the photos themselves, just the filepaths. I've done this with individual photo filepaths before but was wondering if I could import all filenames in a folder at one time instead of one at a time.
 
if I could import all filenames in a folder at one time instead of one at a time.
Nothing ever happens all at once. Things like this are done one at a time using a loop. I use FSO (File System Object) to open the folder and then loop through all the files. As the loop reads each file name, you add a row to your table. I'm playing bridge so can't dig out code at the moment. If no one has posted a code loop for you, I'll get to it between 12 and 1. I should have exactly what you need.
 
Special note, if you are using images in a report you will want them in .png format.
Reports can occasionally not display other formats. Bit of a headache, and a real pain to hunt down when I first hit it.
 
Thanks moke
Thank you everyone! This works perfectly and will save me so much time each week. Now, I am going to print off the vba and try and figure it out bit by bit so I understand the steps for myself.

This is really appreciated.
 
Hi again. I've encountered 2 problems.

Firstly, please accept my apologies if I have posted this in the wrong forum - I am just continuing from the original thread. Please let me know if to repost in the Forms or Reports forums.

The first problem is every picture that was taken in portrait mode is rotating 90 deg. I've searched the various forums and saw something called WIA Automation but I don't understand exactly where to insert the code. I have checked the pictures in the photo editor app and the orientation is correct in the app but when I import into the form or report they are rotating.

The second issue I have is that I would like to use this form as a subform - Is this possible?
 
It's OK to leave this second question this time but since the second question has nothing to do with the first, it would have been best to start a new thread so please do that in the future. Only post subsequent questions if they directly relate to the initial problem.
 

Users who are viewing this thread

Back
Top Bottom