freebsdboy has asked for the wisdom of the Perl Monks concerning the following question:
use Win32::OLE; use Win32::OLE::Const 'Microsoft Outlook'; my $outlook = Win32::OLE->new('Outlook.Application') or die "Error!\n"; my $counter; my $namespace = $outlook->GetNamespace("MAPI"); my $cal = $namespace->GetDefaultFolder(olFolderCalendar); my $items = $cal->Items; #$appts->{IncludeRecurrences} = 'True'; #$items->Filter{IsRecurring} = 'True'; for my $itemIndex (1..$items->Count) { my $appts = $items->item($itemIndex);# or die("error getting cal appts +: " . Win32::OLE->LastError()); #print Win32::OLE->LastError(); #next if not defined $appts; if ($appts->{IsRecurring} >= 1 ) { my $pattern = $apps->{RecurrencePattern}; $counter++; print "\n\n"; print "subject = " . $appts->{Subject}."\n"; print "Start = " . $appts->{Start}->Date."\n"; print "Organizer = " . $appts->{Organizer}."\n"; print "Start Time = " . $appts->{Start}->Time."\n"; print "End = " . $appts->{End}->Date."\n"; print "End time = " . $appts->{End}->Date."\n"; print "Duration = " . $appts->{Duration}."\n" ; #1 minute print "Location = " . $appts->{Location} ."\n"; print "body = " . $appts->{Body} ."\n"; print "ReminderMinutesBeforeStart = " . $appts->{ReminderMinutesBefore +Start} ."\n"; print "BusyStatus = " . $appts->{BusyStatus} ."\n"; print "AllDaEvent = " . $appts->{AllDayEvent} ."\n"; print "EntryID = " . $appts->{EntryID} ."\n"; print "CreationTime = " . $appts->{CreationTime}->Date, " ",$appts->{C +reationTime}->Time."\n"; print "IsRecurring = " . $appts->{IsRecurring} ."\n"; print "Pattern Start = " . $appts->{RecurringPattern}->{StartDate}."\n +"; print "Pattern End = " . $appts->{RecurringPattern}->{EndDate}."\n"; } } print $counter . "Total Recurring items\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading Outlook recurring events
by NetWallah (Canon) on Jan 07, 2008 at 23:23 UTC | |
|
Re: Reading Outlook recurring events
by roboticus (Chancellor) on Jan 08, 2008 at 00:29 UTC |