How to get file type icon from a file?

B

Bodo

Hi,
my Access application lets the user choose files (typically Microsoft Word,
Adobe PDF documents etc.), to store the full path and filename into a
database table. A listview displays all records from that table.

For each row in that listview I want to display the file type icon that
windows assigned to the file.

I try googling but found VB specific approaches using SHGetFileInfo API call
and was unable to modify the code to run with Access 2002.

Can anyone help with some VBA code snipsets to proceed with?

Appreciate any thoughts.
 
S

Stuart McCall

Bodo said:
Hi,
my Access application lets the user choose files (typically Microsoft
Word,
Adobe PDF documents etc.), to store the full path and filename into a
database table. A listview displays all records from that table.

For each row in that listview I want to display the file type icon that
windows assigned to the file.

I try googling but found VB specific approaches using SHGetFileInfo API
call
and was unable to modify the code to run with Access 2002.

Can anyone help with some VBA code snipsets to proceed with?

Appreciate any thoughts.

Check out what Randy Birch has at:

http://vbnet.mvps.org/index.html?code/icon/icon16simple.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top