Compartir a través de


PidTagAttachMethod Canonical Property

Applies to: Office 2010 | Outlook 2010 | Visual Studio

Contains a MAPI-defined constant representing the way the contents of an attachment can be accessed.

Associated properties:

PR_ATTACH_METHOD

Identifier:

0x3705

Data type:

PT_LONG

Area:

Message attachment

Remarks

This property can have exactly one of the following values:

  • NO_ATTACHMENT
    The attachment has just been created.

  • ATTACH_BY_VALUE
    The PR_ATTACH_DATA_BIN (PidTagAttachDataBinary) property contains the attachment data.

  • ATTACH_BY_REFERENCE
    The PR_ATTACH_PATHNAME (PidTagAttachPathname) or PR_ATTACH_LONG_PATHNAME (PidTagAttachLongPathname) property contains a fully-qualified path identifying the attachment to recipients with access to a common file server.

  • ATTACH_BY_REF_RESOLVE
    The PR_ATTACH_PATHNAME or PR_ATTACH_LONG_PATHNAME property contains a fully-qualified path identifying the attachment.

  • ATTACH_BY_REF_ONLY
    The PR_ATTACH_PATHNAME or PR_ATTACH_LONG_PATHNAME property contains a fully-qualified path identifying the attachment.

  • ATTACH_EMBEDDED_MSG
    The PR_ATTACH_DATA_OBJ (PidTagAttachDataObject) property contains an embedded object that supports the IMessage interface.

  • ATTACH_OLE
    The attachment is an embedded OLE object.

When created, all attachment objects have an initial PR_ATTACH_METHOD value of NO_ATTACHMENT.

Client applications and service providers are only required to support the attachment method represented by the ATTACH_BY_VALUE value. The other attachment methods are optional. The message store does not enforce any consistency between the value of PR_ATTACH_METHOD and the values of the other attachment properties.

Universal naming convention (UNC) names are recommended for fully-qualified paths, which should be used with ATTACH_BY_REFERENCE and ATTACH_BY_REF_ONLY. With ATTACH_BY_REF_RESOLVE, an absolute path is faster, because the MAPI spooler converts the attachment to ATTACH_BY_VALUE.

If ATTACH_BY_REFERENCE is set, PR_ATTACH_DATA_BIN must be empty. An outbound gateway can turn an ATTACH_BY_REFERENCE attachment into an ATTACH_BY_VALUE attachment by copying the attachment data into the PR_ATTACH_DATA_BIN property.

If ATTACH_BY_REF_RESOLVE is set, PR_ATTACH_DATA_BIN must be empty. When the message that contains the ATTACH_BY_REF_RESOLVE attachment is sent, the MAPI spooler copies the attachment data into an ATTACH_BY_VALUE attachment. This resolution process places the attachment data in PR_ATTACH_DATA_BIN.

If ATTACH_BY_REF_ONLY is set, PR_ATTACH_DATA_BIN must be empty, and the messaging system never resolves the attachment reference. Use this value when you want to send the link but not the data.

When the OLE object is in OLE 2.0 IStorage format, the data is accessible through PR_ATTACH_DATA_OBJ. When the OLE object is in OLE 1.0 OLESTREAM format, the data is accessible through PR_ATTACH_DATA_BIN as an IStream. The type of the OLE encoding can be determined by the PR_ATTACH_TAG (PidTagAttachTag) value.

For more information on OLE interfaces and formats, see the OLE Programmer's Reference.

Protocol Specifications

Header Files

  • Mapidefs.h
    Provides data type definitions.

  • Mapitags.h
    Contains definitions of properties listed as alternate names.

See Also

Reference

PidTagStoreSupportMask Canonical Property

Concepts

MAPI Properties

MAPI Canonical Properties

Mapping Canonical Property Names to MAPI Names

Mapping MAPI Names to Canonical Property Names