This project has moved and is read-only. For the latest updates, please go here.

Extended file attributes from a .PDF (file) using VBA in excel

Sep 15, 2016 at 7:55 PM
I couldn't describe my feelings when I found your tool thanks so much for it.

Quick question...
While I'm trying to get those properties in a spread sheet through VBA and more particularly using the
sValue = oDir.GetDetailsOf(objFile, 18)
it returns "Tags" instead of the value that is "221"
It will be much appreciated if I can have a comment or suggestion from you

Thanks in advance!

P.S. this is the link to my issue in Stackoverflow
Sep 16, 2016 at 12:01 PM
Very interesting. I’ve not tried to get at properties this way. I shall investigate.

By the way, in case bitness is part of the problem, are you 32 or 64 bit Windows? Office?

Sep 16, 2016 at 1:30 PM
Thanks for your reply

I'm on 64bit
Sep 16, 2016 at 3:42 PM
Edited Sep 17, 2016 at 10:23 AM
The problem reproduces on my system, which is 64 bit Windows with 32-bit Office.

The issue is that File Meta for 64-bit sets up only the 64-bit property handler, but 32-bit Office can only use the 32-bit property handler.

Right now, this can be worked around in two steps:
  1. Install File Meta 32-bit as well as 64-bit. In the optional components dialog, all components other than the property handler should be deselected.
  2. For each extension whose properties are extended, and that did not already have a handler, add an entry to the 32-bit section of the registry specifying the File Meta 32 bit property handler. For instance, for .txt:
Windows Registry Editor Version 5.00

The Guid is always the same, just the extension (= the key name) varies. Note, if the key for an extension already exists and has a value, you should leave it alone, as this means it already has a handler.

If you can confirm that this is indeed the problem, and this workaround fixes it, maybe it’s not too late to get this into 1.4.

Sep 17, 2016 at 10:26 AM
I have just modified my previous post to make it clear that the registry change should only be applied to extensions that did not previously have a handler. This would almost always be true if you are using File Meta 1.3, but it is a good idea to check anyway, using the Registry editor.

Sep 18, 2016 at 10:33 AM
The more I think about this, the more convinced I become that I should fix the lack of 32-bit property access on 64-bit systems. So I am currently working on an updated release that supports this.

Within a couple of days I should have a test release that you can try to see if it fixes your problem without all the registry hacking described above. I think it highly likely that it will.

Sep 18, 2016 at 9:25 PM
Hi Dijji,

Thanks for the reply I appreciate much your effort.
I will wait for your release to test this first then, if still I have the issue I will try your tip with the registry just for proofing it.

Best Regards
Sep 20, 2016 at 6:42 PM
Okay, I have created a new download you to try, File Meta 1.5. To use this, do the following:
  1. Uninstall the existing version of File Meta, and install File Meta 1.5
  2. Open File Association Manager, and for each extension that you want to test, do the following:
    a) Select the extension
    b) Make a note of the profile currently being used for the extension
    c) Click on Remove Property Handler
    d) Select the extension, select the profile you just made a note of, and click on Add Property Handler
At this point, your VBA macro should start working correctly.

To go back to your previous version of File Meta:
  1. Open File Association Manager, and for each extension that you tested, click on Remove Property Handler
  2. Uninstall File Meta 1.5, and install the previous version of File Meta
  3. Open File Association Manager, and for each extension that you tested, select the extension, select the profile that you made a note for that extension, and click on Add Property Handler
Do let me know what you find. I have tested this on Windows 7 and Windows 10, both where a previous version of File Meta was installed, and where it wasn’t, and it looks pretty solid.

Sep 24, 2016 at 7:57 PM
Hi Dijji,

I'm only sending this as I cannot see my previous post.

The 1.5 release seems to work fine with my macro on Win10 x64Bit with M.Office 2016 x32Bit.
I do get all the meta data from word & pdf files without any issue.

Great Job!

Now after change back to 1.3 for obvious reasons I'm going back to a slightly different issue.
When I run my macro it gives me blank instead of the property name but I think this is on me as I've changed some lines on my macro.
So, please consider that the actual issue is that the vba code returns "".

Please keep in mind the following:
  • In 1.3 & 1.5 release when I use a macro to copy files to a destination the pdf copied files missing the metadata. However when I do this manually ctrl+c & ctrl+v the metadata are there, Funny isn't it?
    -When I removed the 1.5 and reinstalled the 1.3 the meta data appeared again on the window explorer . I assume this is good.
    -When I r-clicked on a word file to add more tags my code found those changes. Another win!
    So, now...shall we wait for a more formal version of the 1.5 release or I can use this as long as it works?
Sep 24, 2016 at 8:49 PM
That’s excellent. Thank you for trying the 1.5 release out.

Feel free to continue using it. I think it’s pretty stable, and the only change that I am considering in that area is to add a button to the File Association Manager to refresh the configuration, so that you don’t have to go through the steps of removing and adding handlers manually to update the registry settings for 1.5.

It will be a week or two before the official release, though, because I’m working on adding command line support for the File Association Manager operations to the final release of 1.5. But when it comes, it should be completely compatible.

I’m not sure I fully understood your final bullet. It sounds as though metadata is disappearing and appearing unexpectedly as you copy files in different ways, depending on whether you read the properties using File Explorer or VBA. Is there anything there I should be looking at fixing in 1.5?