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
| Value | Hex | Description |
|---|---|---|
PTYP_INTEGER16 | 0x0002 | 16-bit signed integer. |
PTYP_INTEGER32 | 0x0003 | 32-bit signed integer. |
PTYP_FLOATING32 | 0x0004 | 32-bit floating point. |
PTYP_FLOATING64 | 0x0005 | 64-bit floating point. |
PTYP_CURRENCY | 0x0006 | 64-bit currency value. |
PTYP_FLOATINGTIME | 0x0007 | Floating-point time value. |
PTYP_ERRORCODE | 0x000A | 32-bit error code. |
PTYP_BOOLEAN | 0x000B | 16-bit Boolean (0 = false, non-zero = true). |
PTYP_OBJECT | 0x000D | Embedded object (OLE or MSG). |
PTYP_INTEGER64 | 0x0014 | 64-bit signed integer. |
PTYP_STRING8 | 0x001E | Null-terminated 8-bit string (code page encoded). |
PTYP_STRING | 0x001F | Null-terminated Unicode (UTF-16LE) string. |
PTYP_TIME | 0x0040 | 64-bit Windows FILETIME. |
PTYP_GUID | 0x0048 | 128-bit GUID. |
PTYP_BINARY | 0x0102 | Variable-length binary data. |
PTYP_MULTIPLE_INTEGER16 | 0x1002 | Multi-value 16-bit integer. |
PTYP_MULTIPLE_INTEGER32 | 0x1003 | Multi-value 32-bit integer. |
PTYP_MULTIPLE_FLOATING32 | 0x1004 | Multi-value 32-bit float. |
PTYP_MULTIPLE_FLOATING64 | 0x1005 | Multi-value 64-bit float. |
PTYP_MULTIPLE_CURRENCY | 0x1006 | Multi-value currency. |
PTYP_MULTIPLE_FLOATINGTIME | 0x1007 | Multi-value floating-point time. |
PTYP_MULTIPLE_INTEGER64 | 0x1014 | Multi-value 64-bit integer. |
PTYP_MULTIPLE_STRING8 | 0x101E | Multi-value 8-bit string. |
PTYP_MULTIPLE_STRING | 0x101F | Multi-value Unicode string. |
PTYP_MULTIPLE_TIME | 0x1040 | Multi-value FILETIME. |
PTYP_MULTIPLE_GUID | 0x1048 | Multi-value GUID. |
PTYP_MULTIPLE_BINARY | 0x1102 | Multi-value binary. |