Export (0) Print
Expand All

DocIcons Element (Document Icons)

Last modified: July 15, 2011

Applies to: SharePoint Foundation 2013 | SharePoint Server 2013

In this article
Attributes
Child Elements
Parent Elements
Occurrences

Top-level element in the DocIcon.xml file that defines the mapping between file types and their corresponding document library icons.


<DocIcons>
</DocIcons>

Attribute

Description

None

N/A

Minimum: 0

Maximum: 1

In general, there are two ways that mapping can be performed: by extension (for example, the ByExtension element can be used to map .xls to the appropriate icon for a Microsoft Excel file) and by ProgID.

Note Note

A ProgId is a registry entry that associates the program identifier (ProgID) of a COM object with its class identifier (CLSID). For example, the registry key HKLM\Software\Classes\Word.Document has a subkey named CLSID with a value of {F4754C9B-64F5-4B40-8AF4-679732AC0607}. In this case, the key name Word.Document is a ProgId, a shorthand way of saying {F4754C9B-64F5-4B40-8AF4-679732AC0607}. For more information, see <ProgId> Key (COM).

The following example defines file icons by both ProgIDs and file extensions, but it also sets a default icon for new documents.

<DocIcons>
  <ByProgID>
    <Mapping Key="Excel.Sheet" Value="ichtmxls.gif"/>
    <Mapping Key="PowerPoint.Slide" Value="ichtmppt.gif"/>
    <Mapping Key="Word.Document" Value="ichtmdoc.gif"/>
  </ByProgID>
  <ByExtension>
    <Mapping Key="doc" Value="icdoc.gif"/>
    <Mapping Key="gif" Value="icgif.gif"/>
    <Mapping Key="htm" Value="ichtm.gif"/>
    <Mapping Key="html" Value="ichtm.gif"/>
    <Mapping Key="ppt" Value="icppt.gif"/>
  </ByExtension>
  <Default>
    <Mapping Value="icgen.gif"/>
  </Default>
</DocIcons>
Show:
© 2014 Microsoft