Perl outlook calendar


T

timgerr()

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";


}
 
Ad

Advertisements

B

Brian Helterline

timgerr()@()gmail.com said:
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.

check out the docs for Win32::OLE::Variant.
Dates are stored as a varient data type so you need to

print $message->{Start}->Date
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top