use Win32::OLE::Variant; my $tag = Win32::OLE::Variant->new( VT_R8, $self->{message} ->GetIDsFromNames( '{00020386-0000-0000-C000-000000000046}', $name ) ); # When using GetIDsFromNames you must OR the result you get back with the type of property tag, # in this case PT_STRING8. # PT_STRING8 == 0x0000001E # in binary my $pt_string8 = unpack( "B*", pack( "N", 0x0000001E ) ); my $tag_bin = unpack( "B*", pack( "N", $tag->Value() ) ); my $test = $tag_bin | $pt_string8; $test = oct("0b$test"); #$self->{message}->{Fields} = $array->Value(); #$self->{message}->{Fields}->[$test] = $value; $self->{message}->LetProperty('Fields', $test, $value);