PDF metadata

"Tags" is an overloaded term and I think it is causing a lot of the confusion here.

Metadata.tags is just a list of strings, used like keywords. Any string at all can be added to that list. Whatever you type can be added to the list. Metadata.tags just returns the list of strings which have been typed.

Metadata.tags is not any specific name/value fields. It is not for things like "Author: JK Rowling" or "Artist: David Hasselhoff".

In terms of the Metadata panel, Metadata.tags is just the one line with the red triangle next to it in this screenshot:


Metadata.tags is not any of these other lines:


If you want the document Title, that will not be in Metadata.tags. The way to get specific name/value fields was shown in Re: Gathering image metadata for things that are part of Metadata.image, and it's the same for things that are part of Metadata.doc and Metadata.other.

You're already using similar code in some of your examples above. The only problem seems to be this question:

If you want to use both, you simply use both. Nothing is stopping you:

Option Explicit Function OnClick(ByRef clickData) Dim selItem, imageData For Each selItem in clickData.func.sourcetab.selected ' Do Anything you want with selItem.Metadata.doc here ' Do Anything you want with selItem.Metadata.other here Next End Function

If you want, you can do something like this to make things a bit tidier (and possibly more efficient), but the end result is the same as above:

Option Explicit Function OnClick(ByRef clickData) Dim selItem, imageData For Each selItem in clickData.func.sourcetab.selected Set metaData = selItem.Metadata Set docData = metaData.doc Set otherData = metaData.other ' Do Anything you want with docData here ' Do Anything you want with otherData here Next End Function