Compartilhar via


DOCICON.XML

Each front-end Web server in a Microsoft® Windows® SharePoint™ Services deployment contains a DOCICON.XML file located in the Local_Drive\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\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 for Windows SharePoint Services, or when you upgrade an installation to the next product version.

<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 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.

<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 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.

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.

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

The Default element specifies the default image file to be used for file types not specified in DOCICON.XML.

For an example that demonstrates how to customize DOCICON.XML, see Adding a Document Template, File Type, and Editing Application to a Site Definition.