Saturday, February 23, 2019

#1 2011-09-18 10:39:45 am

Registered: 2011-09-17
Posts: 1

Outlook 2011 Message to Event

Outlook 2011 has:
Create task from message
Create note from message
but no:
Create Event from message

I have searched the board without luck, along with other boards and various blogs.  Has anyone found a solution for this and/or can you point me to a thread?

Thanks in advance!

Filed under: message, Event, Outlook



#2 2011-11-14 05:08:48 pm

Registered: 2011-09-23
Posts: 4

Re: Outlook 2011 Message to Event


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
   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 the start and end time
       set currentTime to (current date)
       set startTime to currentTime + 60 * 60
       set endTime to currentTime + 60 * 120
       -- create a new calendar event with the information from the message
       set newEvent to make new calendar event with properties {subject:theName, content:theContent, start time:startTime, end time:endTime}
   end repeat
   -- if there was only one message selected, then open that new calendar event
   if (count of selectedMessages) = 1 then
       open newEvent
       go to (current date)
   end if
end tell



Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)