Reading IPTC metadata in JPEGs

On my system, late-bound variables failed. It worked when I set a reference to Shell32.dll and used strongly typed variables. This is what I'm suggesting to the OP to try next. I think he set the reference, but he's still not strongly typing his variables. We'll see...
 
On my system, late-bound variables failed. It worked when I set a reference to Shell32.dll and used strongly typed variables. This is what I'm suggesting to the OP to try next. I think he set the reference, but he's still not strongly typing his variables. We'll see...

When I search for Shell32.dll on my system (Windows 7) I get more than 30 hits. Assuming the OP has lots of them too what's the chances of the right one being selected for a reference. I think we need to find out why this reference isn't showing up in the OP's references at least if it should be. Maybe Access needs to be repaired or reinstalled.

I've attached a test database if anyone is interested.
 

Attachments

I am using Windows 7.

I did a repair once before and if I need to reinstall it I will if you think that would help.

Steve, I ran your example and it worked perfect! So I am thinking it might be something with my code.

Can I use you code in my project?

I have never had the need to use Shell before and this old brain is having a hard time wrapping my head around it.

Thanks for the help.

Jim
 
Last edited:
Can I use you code in my project?
Of course it was really your code.

Anyway I figured out the late binding problem. I was reading about late binding and it said

Late binding is still useful in situations where the exact interface of an object is not known at design-time. If your application seeks to talk with multiple unknown servers or needs to invoke functions by name (using the Visual Basic 6.0 CallByName function for example) then you need to use late binding.


When I saw CallByName I thought why not give that a try which led me to this page where I saw that the folder has a type of Variant. That was the problem. If you change this

Code:
Public Function getFileMetadata(fileFolder As[COLOR="red"] String[/COLOR], fileNm As String, metadataType As String) As String
to
Code:
Public Function getFileMetadata(fileFolder As [COLOR="red"]Variant[/COLOR], fileNm As String, metadataType As String) As String

It will work with late binding. My test database is attached with this change and late binding
 

Attachments

Steve thank you and THANK you to the others that have helped me here and not making me feel like an idiot.

I haven't used Access like this in years and it's been tuff getting back in the saddle.

It's been fun but head banging at the same time. Just to let you know, I do a lot of research before I post here but appreciate all of it.

Thanks again everyone for the outstanding help!!!

Jim
 
I wanted to show you all the final product. I still need to do some tweaking but the code is working perfect.

As you can see, because I am using a tabular form, all the fields get populated when I run the code.

I have some ideas but for now I am happy with the direction it is going and much of it is because of you all.

Thanks again!

Jim
 

Attachments

  • 2017-03-19_10-19-45.jpg
    2017-03-19_10-19-45.jpg
    78.5 KB · Views: 224

Users who are viewing this thread

Back
Top Bottom