Created
April 1, 2012 18:30
-
-
Save talkingmoose/2277552 to your computer and use it in GitHub Desktop.
Outlook for Mac AppleScript to create an event from a task
This file contains 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
(* | |
Create Event from Task | |
Copyright (c) Microsoft Corporation. All rights reserved. | |
Modified by William Smith. | |
*) | |
tell application "Microsoft Outlook" | |
-- get the currently selected task or tasks | |
set selectedTasks to selection | |
-- if there are no tasks selected, warn the user and then quit | |
if selectedTasks is {} then | |
display dialog "Please select a task first and then run this script." with icon 1 | |
return | |
end if | |
repeat with theTask in selectedTasks | |
-- get the information from the message, and store it in variables | |
set theName to name of theTask | |
set theCategory to category of theTask | |
set theContent to content of theTask | |
if theContent is missing value then | |
set theContent to "" | |
end if | |
-- create a new event with the information from the task | |
set newEvent to make new calendar event with properties {subject:theName, category:theCategory, content:theContent, start time:(current date) + 1800, end time:(current date) + 3600} | |
-- if there was only one task selected, then open that new note | |
if (count of selectedTasks) = 1 then open newEvent | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello talkingmoose,
Can an Apple script be written to- Not allow any meeting invites show up as tentative on the outlook calendar? Then, the user has the option to manually accept the meetings they want.
Luke