Created
September 11, 2011 20:16
-
-
Save talkingmoose/1210066 to your computer and use it in GitHub Desktop.
Add Outlook for Mac contact birthdays to calendar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Microsoft Outlook" | |
set contactList to every contact | |
set theYear to text returned of (display dialog "Enter the calendar year for new birthday reminders." default answer year of (current date) with title "Which year?" with icon 1) | |
if theYear as integer ≤ 1904 or theYear as integer ≥ 2039 then | |
display dialog "You must specify a year between 1904 and 2039." with icon stop with title "Error!" buttons {"Cancel"} | |
end if | |
repeat with aContact in contactList | |
if birthday of aContact is not missing value then | |
set theBirthday to birthday of aContact | |
set year of theBirthday to theYear | |
make new calendar event at calendar "Birthdays" with properties {subject:"Birthday - " & display name of aContact, start time:theBirthday, end time:theBirthday + 86400, all day flag:true, has reminder:true, reminder time:10080, free busy status:free} | |
end if | |
end repeat | |
display dialog "Birthdays for the year " & theYear & " have been added to your Birthdays calendar." with icon 1 buttons {"OK"} default button {"OK"} | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi sir,
how to export all calendar event?
please give me apple script for export all calender data of outlook 2011 mac.
thanks