• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 43
  • Last Modified:

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.
0
David Everett
Asked:
David Everett
  • 4
  • 3
1 Solution
 
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
 
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now