Thursday, June 11, 2009

SP Document Library Type Icons

Hey all,
if u pay attention to detail you will realize that by default when you create document libraries you have the option of choosing which document templates to use for the library e.g word, excel, powerpoint or even sharepoint designer pages.
when anyone of these docs is created or uploaded to the library there is a type column under which we have icons corresponding to the respective document types.

But if u try to upload some other document types then by default sharepoint will use a white paper icon to represent that type. fortunately there is a way out;
i uploaded my pdf file along with an mp3 file in the same library and as you would expect the corresponding document type icon for both these files is a white paper icon.
First of all get the images you want to use as document type icons in the right size.
secondly get down the 12 hive to the TEMPLATE folder (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE)
paste the image in the IMAGES folder and back to the XML folder, there open the file DOCICON.XML for editing,
all you have to do is add a mapping by extension for the image we want to use

Mapping Key="pdf" Value="myImage.gif" (make sure u add opening & closing tags as i left them out here intentionally)

note here that "pdf" is the extension so it could be any other file extension
save the file close and restart iis.
you should have nice icons in your document library like this;