T
timgerr
Not sure if anyone has used perl and outlook scripts but here I go.
OK I have found a little information on Perl and Outlook calendars. I
have a few questions that I want to ask. If I have myltiple calendars
in Outlook can I tell the OLE to use different ones? I have 2
calendars, test1 (default) and test 2. I want to query both calenders,
can this be done? The other question is I am trying to get all the
output in the hash ( I think it is a hash) $message. When the part
runs print "Start = " . $message->{Start}."\n";
I get this output Start = Win32::OLE::Variant=SCALAR(0x182a9b8).
How can I find out what is in this scalar? Any information would be
great.
Here is my code:
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Outlook';
my $outlook = Win32::OLE->new('Outlook.Application') or die
"Error!\n";
my $namespace = $outlook->GetNamespace("MAPI");
my $folder = $namespace->GetDefaultFolder(olFolderCalendar);
my $items = $folder->Items;
for my $itemIndex (1..$items->Count)
{
my $message = $items->item($itemIndex);
next if not defined $message;
print "subject = " . $message->{Subject}."\n";
print "Start = " . $message->{Start}."\n";
OK I have found a little information on Perl and Outlook calendars. I
have a few questions that I want to ask. If I have myltiple calendars
in Outlook can I tell the OLE to use different ones? I have 2
calendars, test1 (default) and test 2. I want to query both calenders,
can this be done? The other question is I am trying to get all the
output in the hash ( I think it is a hash) $message. When the part
runs print "Start = " . $message->{Start}."\n";
I get this output Start = Win32::OLE::Variant=SCALAR(0x182a9b8).
How can I find out what is in this scalar? Any information would be
great.
Here is my code:
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Outlook';
my $outlook = Win32::OLE->new('Outlook.Application') or die
"Error!\n";
my $namespace = $outlook->GetNamespace("MAPI");
my $folder = $namespace->GetDefaultFolder(olFolderCalendar);
my $items = $folder->Items;
for my $itemIndex (1..$items->Count)
{
my $message = $items->item($itemIndex);
next if not defined $message;
print "subject = " . $message->{Subject}."\n";
print "Start = " . $message->{Start}."\n";