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 |
Hi,
Thanks for the script. I'm trying to create a meeting invite from a selected message. I can create a calendar event but cannot seem to get recipients added. I've tried
set newMtg to (make new calendar event with properties {subject:"test"} with attendee given email address:"a.b.com")
then either
open newMtg
or
forward newMtg to "a@b.com"
and neither work. Any help would be great. Thanks.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instructions:
To use the script select a task and then select Create Event from Task\cmE from the AppleScript menu.