Link to home
Start Free TrialLog in
Avatar of jrram
jrramFlag for United States of America

asked on

VBA - Get File Additional Properties (Summary Tab)

I only have Windows XP on my computer, so I'

You know how if you right click a file in Windows XP, hit properties, then you get the 'General' and 'Summary' tab.  I now know how to get the information that appears on the General tab, but I'm clueless on if/how the information on the Summary tab can be retrieved using vba?

Attributes on this tab are Title, Subject, Author, Category, Keywords, Comments.

I want to do this w/o having to open the file.

Has anyone ever done this.  If so, please provide code.
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

Hi jrram,

This PAQ demonstrates one way to do this:

https://www.experts-exchange.com/questions/21936461/Batch-Word-Count-for-Word-documents.html

Regards,

Patrick
jrram,

Can you be a little more specific on what you're trying to do?

Patrick
SOLUTION
Avatar of GRayL
GRayL
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jrram

ASKER

>> matthewspatrick,

I was writing a program to read all the file properties for all files in a particular directory and store all the info in a database.  I can get to the normal attributes (file size, location, etc), just not those mentioned in my original post.

>> GRayL

Does that code work with non-images.  I just downladed the class and noticed the readme file referred to jpg files.  In my case, I could be reading various files (word docs, pdfs, images, etc).
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jrram

ASKER

Will give it a try... I hate having to download and install dlls, but I guess you can't get around it sometimes :-)
jrram,

You could get around it, but it would mean opening each Office file in its native app to get at the properties.
Are you more interested in that approach?

Patrick
Avatar of jrram

ASKER

Thanks guys, I got it working.

Do either of you know of any other file types besides 'jpg' that the DSO library will not work with?
It is difficult to tell from the Microsoft KB entry exactly what is supported.  It seems that these are definitely
supported:

Excel workbooks
Word documents
Visio drawings
Project projects
PowerPoint presentations
"Other files without those Office products installed", whatever that means

Patrick
Avatar of jrram

ASKER

:-)  I guess I'll see as times goes along and I process files,  what is and isn't supported.

Thanks again
It is not completely correct to say DSOFile.dll does not work with jpgs.  It will work, but only retreive certain additional file info elements.  This is discussed at length in:

http://www.microsoft.com/technet/community/columns/scripts/sg0305.mspx
You were too quick.