[python-win32] How to set value for multi-valued property using mapi?
Nick Czeczulin
nick at packetfrenzy.com
Tue Dec 30 11:28:47 CET 2014
Kapil Dolas wrote:
> I want to set multiple values for multi-valued property using SetProps. SetProps list
> of tuples of tag and value as argument, where value should be string or unicode.
> How to set multiple values for multi-valued property in this case? Should I convert list
> of values to string or something like that?
The multi-valued property's type specifies what the values being passed should be. The below example's named property happens to be PT_MV_UNICODE, so we get and set the values using unicode.
>>> msg.GetProps((0x80a2101f,))
(0, ((2158104607L, (u'Orange category', u'Green category', u'Blue category')),))
>>> msg.SetProps( ((0x80a2101f,(u'Orange category', u'Green category', u'Blue category', u'Red category')),) )
(0, None)
>>> msg.GetProps((0x80a2101f,))
(0, ((2158104607L, (u'Orange category', u'Green category', u'Blue category', u'Red category')),))
Hth,
-nick
More information about the python-win32
mailing list