PyPROPVARIANT Object

Encapsulates a PROPVARIANT structure. Constructed using PROPVARIANTType(Value, Type=VT_ILLEGAL). Value can be any object that can be be converted to the requested variant type. Type should be a combination of VARENUM values (pythoncom.VT_*). VT_ILLEGAL indicates that an appropriate variant type should be inferred from the Value. If the requested Type includes VT_VECTOR, Value should be a sequence of compatible objects. Currently VT_ARRAY and VT_BYREF are not supported, although some types can be coerced into a safearray using PyPROPVARIANT::ChangeType.

Properties

int vt
The variant type, a combination of VARENUM values including flags. (read only)

Methods

GetValue
Returns an object representing the variant value 

ToString
Returns the value as a string 

ChangeType
Coerce to a different variant type