in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

Eric Kraus SharePoint Blog

Modify SharePoint Document Icons

Here’s a quick easy way to modify the icons SharePoint displays for different file types.  This procedure can also be used to configure an icon for a custom file type you may have.

Be sure to back up any files before making any changes!

1.  Open the 12 Hive (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12)

2.  Browse to the ...\TEMPLATE\XML folder

3.  Open the DOCICON.XML file

4.  Modify an existing record, or add a new one.

Here’s an example of an XML file that a customer of mine was working with and the corresponding entry I added:

Invoice.cif  
<Mapping Key="cif" Value="iccif.gif"  EditText="Customer Invoice File" OpenControl=""/>


The Value property of the node points to the /_layouts/images virtual path which can be found in the 12 Hive in …\TEMPLATE\IMAGES   - put your (.gif) icon image there.

Comments

 

SHAREPOINTBlogs.com Mirror said:

Here’s a quick easy way to modify the icons SharePoint displays for different file types. This procedure

December 8, 2007 11:26 PM
 

Paul Galvin said:

Nice and straight to the point. Thanks!

December 9, 2007 7:41 AM
 

Matt said:

Hi Eric

How could I deploy this as a feature, given we're not meant to modify default files?

Thanks

February 14, 2008 10:10 AM
 

Renato said:

thank you!

February 20, 2008 11:23 AM
 

erickraus said:

To deploy as a "feature" (actually a solution package)....

1.  Create a WSP

2.  In your manifest.xml file, add  TemplateFile="XML\DOCICON.XML"

3.  The path here resembles your TEMPLATE folder in the 12 Hive and ALSO the relative path for the file(s) in the .WSP

4.  When the WSP (solution) is deployed, it will copy the file(s) out to the filesystem.

THIS PROCESS DOES NOT ACCOUNT FOR BACKING UP THE EXISTING FILE.  -- You may need to look into custom code for that.

February 21, 2008 8:45 AM

Leave a Comment

(required )  
(optional )
(required )  
Add

About erickraus

Eric has recently moved positions to become a SharePoint consultant with Microsoft Corporation in Minneapolis, MN. He has been working with .NET for 6 years and MOSS since Beta releases. Eric is MCTS certified in MOSS 2007 and holds an MCAD certification in .NET. He has implemented several enterprise collaboration and web content management solutions as well as numerous custom applications integrating MOSS, .NET, BizTalk, and Oracle. When not dreaming of SharePoint, Eric enjoys photography, snowboarding, and spending time with his girlfriend.


Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts