How to read/write JPG file meta data using VBA and Access 2010

Using Access 2010 I want to write VBA that will allow me to:
1. Rename a .JPG file.
2. Read meta data from a .JPG file. (e.g. Title)
3. Write or update meta data in a .JPG file. (e.g. Comments)
Assume path such as "C:\images\example.jpg"
I am looking for what commands to use or pointers to helpful code.
Thanks.
David EverettConsultantAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

John TsioumprisSoftware & Systems EngineerCommented:
For start you need a reference to the wiaaut.dll Windows Image Acquisition Library (you should find it in the system32)
Then the code should start like this

Public Function ImageExamine(imgPath As String) as Variant

Dim Img As WIA.ImageFile
Set Img = CreateObject("WIA.ImageFile")            
Img.LoadFile inPath
Debug.Print img.Properties(x) ' Just iterate properties...e.g 1 --> gives name , 2 --> gives Camera Maker
End Function

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David EverettConsultantAuthor Commented:
"For start you need a reference to the wiaaut.dll Windows Image Acquisition Library (you should find it in the system32)"
- Can you be more specific about creating this reference please?
Thanks.
0
John TsioumprisSoftware & Systems EngineerCommented:
Visual Basic Editor (ALT + F11)
Tools --> References --> Browse...find the .dll ...select it.
0
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

David EverettConsultantAuthor Commented:
However... I can't see it in the list!
0
John TsioumprisSoftware & Systems EngineerCommented:
maybe you need to download it...are you using XP ?
Else
If you have Win7 and higher
for 32bit you should find it in System32
for 64bit you should find it in SysWOW64
0
David EverettConsultantAuthor Commented:
Got it - thanks.
0
John TsioumprisSoftware & Systems EngineerCommented:
Solution provided...tested and working
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.