in reply to MS Outlook GetSharedDefaultFolder
Okay, I misunderstood what you were trying to accomplish with the if statements initially and I apologize.
Try moving the variable declarations outside of the if statements.
#!/perl/bin/perl use strict; use warnings; use Win32::OLE; use Win32::OLE::Variant; #Needed for ReceivedTime constant. my $Outlook = Win32::OLE->new('Outlook.Application'); my $namespace = $Outlook->GetNameSpace("MAPI"); my $recipient = $namespace->CreateRecipient("inboxname"); if ($recipient) { print "OK\n"; } else { print "$!\n"; } $recipient->Resolve; # see url if ($recipient->Resolved) { print "Resolved\n"; } else { print "$!, unable to resolve\n"; } my $p2 = $namespace->GetSharedDefaultFolder($recipient,6); # what does + this return? if ($p2) { print "OK2\n"; } else { print "$!, Code fails here, does not return an error\n"; }
(Untested)
See also GetSharedDefaultFolder
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: MS Outlook GetSharedDefaultFolder
by Mitch (Sexton) on Sep 03, 2003 at 22:23 UTC | |
by guha (Priest) on Sep 04, 2003 at 09:46 UTC | |
by Mitch (Sexton) on Sep 04, 2003 at 17:47 UTC |