Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

ByExtension Element

The ByExtension element defines icons for documents according to their file name extensions. 

Syntax

<ByExtension>
</ByExtension>

Related Elements

Parent ElementsChild Elements
DocIconsMapping

Remarks

This element is used in DOCICON.XML to drive mapping between file extensions and their corresponding document library icons.

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

If you want the document library feature to support a new file extension, add the extension to a ByExtension section and then restart the server.

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>

See Also

ByProgID


Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.