GoldMineAap has asked for the wisdom of the Perl Monks concerning the following question:
use Win32::OLE; my %ReadOutlook; $ReadOutlook{'BusinessAddressStreet'}='BusinessAddressStreet'; $ReadOutlook{'FullName'}='FullName'; $ReadOutlook{'BusinessAddressPostalCode'}='BusinessAddressPostalCode'; $ReadOutlook{'Phone3'}='Phone3'; &Read_Current_Outlook_Contact(\%ReadOutlook); sub Read_Current_Outlook_Contact{ my $field; my $value; my ($Config)=@_; my $ol = Win32::OLE->CreateObject("Outlook.Application"); my $myInspector = $ol->{ActiveInspector}; my $ol_CurrentItem=$myInspector->{CurrentItem}; foreach $field (keys %$Config){ $value = $$Config{$field} ; #print "value=$value field=$field\n"; $xx = $ol_CurrentItem->{$value}; $$Config{$value}=$xx; } return; } print "FullName=$ReadOutlook{'FullName'}\n"; print "BusinessAddressStreet=$ReadOutlook{'BusinessAddressStreet'}\n"; print "Zip=$ReadOutlook{'BusinessAddressPostalCode'}\n"; print "Phone3=$ReadOutlook{'Phone3'}\n";
|
|---|