Skip to content

Warning icon for dangerous Office file types

How can you put an obvious visual warning on the screen for file types you should be wary about?

We’ve warned about opening old or potentially dangerous file types like .doc .xls or .rtf .  There are options to totally block opening these files from Outlook.  That can be frustrating when you need to open an incoming document from a trusted source.

One option for a ‘middle ground’ is to make those documents appear with a noticeably different ‘warning’ icon.

Compare that with the standard icons for these file types which are virtually the same.

Ideally, we’d like the same icons to appear in Outlook.  But it’s not that easy.  We changed the file type icons in Windows and the changes appear in Explorer but not in Outlook.

(the Outlook attachments view doesn’t clearly show file extensions. A changed icon would be an immediate and obvious warning that there was something different about the attachment).

See below for a partial explanation of the Outlook anomaly.   We’re publishing this in the hope that one of our readers will be able to figure out the rest of the solution.

Changing the icon for a file type / extension is difficult from Windows itself so, not for the first time, we turn to the good people at Nirsoft.  Their File Types Manager gives you a lot of control.

Find (for example) the .doc entry, right-click to choose Edit File Type then choose a different Default Icon.

Click on the  … button at the end to see the icons available in the current file or select another icon source.

Icons can be in .ico file but collections are more commonly found in .dll files.  There are external icon collections to download but we’ve selected the ‘in-house’ set from Microsoft at  C:\Windows\System32\imageres.dll .  You’ll see many common Windows icons saved there.

Scroll along the icon list and click on the one you want to use.

That’s all great and works fine in Windows Explorer.  But why not in Outlook?

Outlook shows an icon next to attachments but it uses a slightly different logic to do it.  Instead of simply matching the attachment extension to an icon, Outlook bases its choice on the default application for that file type.   We tested that by temporarily changing the default application for a Word document to Wordpad.  The Outlook attachment icon changed (after restarting Outlook) but the Explorer icon was unchanged.

We tried looking in the registry and found a DefaultIcon option under the .docm entry HKEY_CLASSES_ROOT\CLSID\{18A06B6B-2F3F-4e2b-A611-52BE631B2D22}  but that didn’t change the Outlook linked icon.

There should be a way to change the attachment icon for a file type – if you can explain or workaround this curiosity please let us know.

 

About this author

Office-Watch.com

Office Watch is the independent source of Microsoft Office news, tips and help since 1996. Don't miss our famous free newsletter.