PropertyTypeCode

PropertyTypeCode

Overview

PropertyTypeCode is an IntEnum whose members represent the MAPI property type codes defined in the MS-OXCDATA specification. The full 32-bit property tag is formed by combining a property ID with a type code: tag = (property_id << 16) | property_type_code. For example, to store a Unicode string in property 0x0037 (Subject), the tag is (0x0037 << 16) | PropertyTypeCode.PTYP_STRING. Multi-value variants follow the same pattern with the 0x1000 bit set.

from aspose.email_foss import msg

message = msg.MapiMessage.create("Test", "Body")
named = msg.MapiNamedProperty.string("Score", msg.PS_PUBLIC_STRINGS)
message.set_named_property(named, msg.PropertyTypeCode.PTYP_INTEGER32, 42)

Values

ValueHexDescription
PTYP_INTEGER160x000216-bit signed integer.
PTYP_INTEGER320x000332-bit signed integer.
PTYP_FLOATING320x000432-bit floating point.
PTYP_FLOATING640x000564-bit floating point.
PTYP_CURRENCY0x000664-bit currency value.
PTYP_FLOATINGTIME0x0007Floating-point time value.
PTYP_ERRORCODE0x000A32-bit error code.
PTYP_BOOLEAN0x000B16-bit Boolean (0 = false, non-zero = true).
PTYP_OBJECT0x000DEmbedded object (OLE or MSG).
PTYP_INTEGER640x001464-bit signed integer.
PTYP_STRING80x001ENull-terminated 8-bit string (code page encoded).
PTYP_STRING0x001FNull-terminated Unicode (UTF-16LE) string.
PTYP_TIME0x004064-bit Windows FILETIME.
PTYP_GUID0x0048128-bit GUID.
PTYP_BINARY0x0102Variable-length binary data.
PTYP_MULTIPLE_INTEGER160x1002Multi-value 16-bit integer.
PTYP_MULTIPLE_INTEGER320x1003Multi-value 32-bit integer.
PTYP_MULTIPLE_FLOATING320x1004Multi-value 32-bit float.
PTYP_MULTIPLE_FLOATING640x1005Multi-value 64-bit float.
PTYP_MULTIPLE_CURRENCY0x1006Multi-value currency.
PTYP_MULTIPLE_FLOATINGTIME0x1007Multi-value floating-point time.
PTYP_MULTIPLE_INTEGER640x1014Multi-value 64-bit integer.
PTYP_MULTIPLE_STRING80x101EMulti-value 8-bit string.
PTYP_MULTIPLE_STRING0x101FMulti-value Unicode string.
PTYP_MULTIPLE_TIME0x1040Multi-value FILETIME.
PTYP_MULTIPLE_GUID0x1048Multi-value GUID.
PTYP_MULTIPLE_BINARY0x1102Multi-value binary.

See Also