Created
January 27, 2015 00:22
-
-
Save davejlong/d15908f85bca01c447b1 to your computer and use it in GitHub Desktop.
Rebuilding Quick Actions in Outlook for Mac
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
(* | |
Script to Mark Item as Read and Move to folder "Archive" | |
For Microsoft Outlook 15 | |
*) | |
tell application "Microsoft Outlook" | |
activate | |
set msgSet to current messages | |
if msgSet = {} then | |
error "No Messages selected. Select at least one message." | |
error -128 | |
end if | |
set theMsg to item 1 of msgSet | |
set theAccount to account of theMsg | |
set archiveFolder to folder "Archive" of theAccount | |
repeat with aMessage in msgSet | |
set aMessage's is read to true | |
move aMessage to archiveFolder | |
end repeat | |
end tell |
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 Appointment from Message | |
Copyright (c) Microsoft Corporation. All rights reserved. | |
*) | |
tell application .Microsoft Outlook. | |
. get the currently selected message or messages | |
set selectedMessages to current messages | |
. if there are no messages selected, warn the user and then quit | |
if selectedMessages is {} then | |
display dialog .Please select a message first and then run this script.. with icon 1 | |
return | |
end if | |
repeat with theMessage in selectedMessages | |
. get the information from the message, and store it in variables | |
set theName to subject of theMessage | |
set theCategory to category of theMessage | |
set thePriority to priority of theMessage | |
set theContent to content of theMessage | |
set myDate to current date | |
. create a new appointment with the information from the message | |
set newAppointment to make new calendar event with properties {subject:theName, content:theContent, start time:myDate + 1 * hours, end time:myDate + (2 * hours)} | |
end repeat | |
. if there was only one message selected, then open that new task | |
if (count of selectedMessages) = 1 then open newAppointment | |
end tell |
Well some of the " and some of the -- got converted into .
If you fix those then the script will save.
Dave,
about the archive script: can it archive outside outlook, into a folder on the desktop or on a webaddress?
Now I get error: error "Microsoft Outlook kreeg een fout: folder "MailArchive" of exchange account id 1 kan niet worden opgevraagd. " number -1728 from folder "MailArchive" of exchange account id 1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It was some time since you did this, just found it! thank you for this just what I was looking for!
However the Archive scripts work perfect, but the calender scripts keep getting errors...
I just moved my hole production from windows to OSX and trying to learn my way around :)
I would really like to know how to get the calender script to work.
Greatful for all input!
Regards
/Andreas