Go Back   Access World Forums > Microsoft Access Reference > Sample Databases

Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 07-03-2017, 12:59 PM   #1
Gold Supporter
ridders's Avatar
Join Date: Jan 2017
Location: Somerset, UK
Posts: 3,376
Thanks: 60
Thanked 780 Times in 723 Posts
ridders has a spectacular aura about ridders has a spectacular aura about ridders has a spectacular aura about
Obtaining extended file properties (attributes) using VBA

Recently, this thread 'Windows 10 Retrieving Extended File Properties' raised issues about using the GetDetailsOf method to retrieve extended file properties (attributes).

GetDetailsOf is a member of the VBA library 'Microsoft Shell Controls and Automation' based on Shell32.dll.

For anyone else who hasn't heard of this, each file includes several extended properties which can be retrieved as needed using this method.

For example:
Date created / date modified / date last accessed
File size / file type / author / location

Certain types of file will also contain additional extended properties including:
Height / width / horizontal resolution / vertical resolution / bit size (image files)
Contributing artist / album / year / genre / tile / track # / length / bit rate (audio files)

In all, there are a total of 311 extended properties though no files will ever use all of these

I decided to investigate this method further and have created a database which provides an easy way of obtaining and storing all the extended properties for an individual file or all files of a specified type in a selected folder.

The attached text files contain the full list of extended properties (attributes) & example output for an audio file

The zip file contains the database FileAttributes.accdb, a PDF file with full details and screenshots as well as several other text files with examples of the extended properties (attributes) obtained for different types of file

The database includes the VBA reference library 'Microsoft Shell Controls and Automation'

NOTE: it also includes an example of a dynamic crosstab query where the column headers are automatically updated to match the underlying data

Any questions or suggestions, please send me a private message or email me using the address given in the PDF file
Attached Images
File Type: png AttributesByFileType.PNG (65.5 KB, 1333 views)
Attached Files
File Type: zip FileAttributes.zip (1.30 MB, 337 views)
File Type: txt FileAttributesList.txt (5.9 KB, 216 views)
File Type: txt MusicFileAttributes.txt (1.5 KB, 151 views)

Mendip Data Systems
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
, Tapatalk

If this answer has helped, please:
Click the Thanks button and/or click the 'reputation' scales symbol on the left, tick 'I approve' and leave a comment. Cheers!

Last edited by ridders; 09-03-2017 at 02:32 PM. Reason: Modified text
ridders is offline   Reply With Quote
The Following 2 Users Say Thank You to ridders For This Useful Post:
DBQueen (07-13-2017), Gasman (08-02-2017)

attributes , extended file properties , getdetailsof , shell32.dll

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to Retrieve Extended File Properties Steve R. Modules & VBA 8 07-31-2017 01:26 AM
Windows 10 Retrieving Extended File Properties Mohsin Malik Modules & VBA 29 07-14-2017 01:50 AM
xml file attributes seen Word 1 11-05-2013 05:34 AM
File Extended Properties ezfriend General 3 03-30-2007 10:07 AM

All times are GMT -8. The time now is 03:16 AM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World