Hi all,
I’m trying to export a list of all the events in my Outlook Calendar into a text file using the following code:
set eventDetails to ""
set currentDate to current date
set yearFromNow to currentDate + (365 * days)
tell application "Microsoft Outlook"
set theCalendars to calendars
repeat with currentCalendar in theCalendars
repeat with currentEvent in calendar events of currentCalendar
if start time of currentEvent > date "Wednesday, 1 January 2014 00:00:00" and start time of currentEvent < yearFromNow then
set eventDetails to eventDetails ¬
& (subject of currentEvent) ¬
& "\t" & (start time of currentEvent) ¬
& "\t" & (end time of currentEvent) ¬
& "\t" & (is occurrence of currentEvent) ¬
& "\t" & (all day flag of currentEvent) ¬
& "\t" & (has reminder of currentEvent) ¬
& "\t" & (reminder time of currentEvent) ¬
& "\n"
end if
end repeat
end repeat
display dialog (eventDetails)
end tell
This works for most of my events, but some occurrences of my recurring events do not get written out. For example, for one weekly recurring event it writes out 7 of the 10 occurrences between May and June, but then none of the occurrences after June (until December when the recurring event ends).
Anyone any idea why?
Thanks in advance