Share via


DocIcons Element (Document Icons)

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

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

<DocIcons>
</DocIcons>

Attributes

Attribute

Description

None

N/A

Child Elements

ByExtension, ByProgID

Parent Elements

None

Occurrences

Minimum: 0

Maximum: 1

Remarks

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. An HTML document that contains <META Name="ProgId" Content="Word.Document"> would map to an icon for Microsoft Word by using the ByProgID element.

Example

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>