Share via


DocIcon.xml

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.

Each front-end Web server in a Windows SharePoint Services deployment contains a DocIcon.xml file located in the Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\XML folder. DocIcon.xml maps file ProgIDs and file extensions to file icons and to the control to be used when opening each type of file. You can add Mapping elements that map according to file ProgID or file extension.

Warning

Changes to DocIcon.xml should be made with extreme caution because they are global to a Windows SharePoint Services deployment and affect all site definitions on the front-end Web server. Changes that you make to this file may be overwritten when you install updates or service packs to Windows SharePoint Services, or when you upgrade an installation to the next product version.

File Format

The ByProgID element maps the ProgIDs of different file types to file icons, specifies the text displayed for each file type in the drop-down menu that appears when the Edit arrow is clicked, and specifies the ProgID of the control to use for opening documents of a given type. The following excerpt shows part of a ByProgID section:

<DocIcons>
  <ByProgID>
    <Mapping
      Key="Excel.Sheet" 
      Value="ichtmxls.gif" 
      EditText="Microsoft Office Excel" 
      OpenControl="SharePoint.OpenDocuments" />
    <Mapping 
      Key="FrontPage.Editor.Document" 
      Value="ichtmfp.gif" 
      EditText="Microsoft Office FrontPage" 
      OpenControl="SharePoint.OpenDocuments" />
    ...
  </ByProgID>

The ByExtension element maps file extensions to file icons, specifies the text displayed for each file extension in the drop-down menu that appears when the Edit arrow is clicked, and specifies the ProgID of the control to use for opening documents with a given file extension. The following excerpt shows part of a ByExtension section:

  <ByExtension>
    <Mapping
      Key="asax" 
      Value="icasax.gif" />
    <Mapping 
      Key="ascx" 
      Value="icascx.gif" />
    <Mapping 
      Key="asmx" 
      Value="icasmx.gif" />
    ...
    <Mapping 
      Key="mpp" 
      Value="icmpp.gif" 
      EditText="Microsoft Office Project" 
      OpenControl="SharePoint.OpenDocuments" /> 
    <Mapping 
      Key="mps" 
      Value="icmps.gif" /> 
    <Mapping 
      Key="mpt" 
      Value="icmpt.gif" 
      EditText="Microsoft Office Project" 
      OpenControl="SharePoint.OpenDocuments" />
    ...
  </ByExtension>

The Default element specifies the default image file to be used for file types not specified in DocIcon.xml, as seen in the following excerpt.

  <Default>
    <Mapping Value="icgen.gif" />
  </Default>
</DocIcon

Note

To resolve conflicts, ByProgID takes precedence over ByExtension. However, document templates specified in the Onet.xml file of a site definition only work in relation to file types specified within the ByExtension element

See Also

Concepts

How to: Add a Document Template, File Type, and Editing Application to a Site Definition