Condividi tramite


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

Used in the DocIcon.xml file to map particular document types to their respective icons.

<Mapping
  EditText = "Text"
  Key = "Text"
  OpenControl = "Text"
  Value = "Text">
</Mapping>

Attributes

Attribute

Description

EditText

Optional Text. Specifies the name of the application used to edit the type of document.

Key

Required Text. Specifies either a ProgID or a file name extension.

OpenControl

Optional Text. Specifies the name of the Microsoft ActiveX control used to open the type of document.

Value

Required Text. Specifies the URL to the image.

Child Elements

None

Parent Elements

ByExtension, ByProgID

Occurrences

Minimum: 0

Maximum: Unbounded

Example

The following code example maps ProgIDs and file name extensions as follows:

  • For different values of the ProgID <META> tag, it maps ProgIDs to the icons representing the applications. For example, "Excel.Sheet" maps to ichtmxls.gif.

  • It maps file name extensions to appropriate icons. For example, "doc" maps to icdoc.gif.

  • If neither of the above causes a match, it provides a default value, icgen.gif, for the mapping.

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