Thursday, July 9, 2020

#1 2020-06-30 01:09:57 am

ChangeAgent
Member
From:: Scotland
Registered: 2008-03-07
Posts: 336

Outlook script no longer working in 365

I have this script that moves enclosures in an email to a specific folder on my Mac.

In V2011 it worked a dream.  In V365 is stopped working.  I get the following error and do not know how to fix this.

Applescript:

tell application "Microsoft Outlook"
   get current messages
       --> {}
Result:
error "Can’t get item 1 of {}." number -1728 from item 1 of {}

here is the first part of the script.


Applescript:

tell application "Microsoft Outlook"
   set selectedMsg to (current messages)
   set selectedMsg to item 1 of result
   set msgAttachment to attachments of selectedMsg
   set msgAttachment to result's item 1
   
   set attachmentName to name of msgAttachment
   set attachmentFile to ((path to desktop) & attachmentName) as text
   
   --> save message to disk before we open it
   save msgAttachment in file attachmentFile -- NB. 'file' specifier.
end tell

thanks.

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)