Mitch has asked for the wisdom of the Perl Monks concerning the following question:
use Win32::OLE; use Win32::OLE::Variant; #Needed for ReceivedTime constant. $Outlook=Win32::OLE->new('Outlook.Application'); $namespace = $Outlook->GetNameSpace("MAPI"); if ($recipient = $namespace->CreateRecipient("inboxname")) { print "OK\n"; } else { print "$!\n"; } if ($recipient->Resolve) { print "Resolved\n"; } else { print "$!, unable to resolve\n"; } if ($p2 = $namespace->GetSharedDefaultFolder($recipient,6)) { # The code fails here print "OK2\n"; } else { print "$!, Code fails here, does not return an error\n"; }
|
|---|