Outlook for Mac

Need help troubleshooting Applescript- Move currently selected Outlook Mssg to a Folder

待回答 0 个回答

较早的帖子,发布于 2015年4月29日。 其中的信息可能已经过时。

本帖暂无中文翻译,以下为英文原文。

问题 提问于 2015年4月29日

Hello,

Any help troubleshooting will be greatly appreciated. I'm trying to write a simple script in Applescript that takes the currently selected Outlook Message and moves it to an Outlook Folder called TEST. I'm on Outlook for Mac 2011 Ver 14. Here's the code.

*******************************************

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 "TEST" of on my computer
    repeat with aMessage in msgSet
        move aMessage to archiveFolder
    end repeat
end tell

*******************************************

When I run this script I get an error as follows.

AppleScript Error

Microsoft Outlook got an error: Cant get folder "TEST" of on my computer.

It looks like the script can't see the folder. Here's what my folder hierarchy looks like in Outlook:

Any ideas on how to resolve this? Thanks!

暂无回答

撰写回答

您的邮箱地址不会被公开。请勿发布密码。

This site uses Akismet to reduce spam. Learn how your comment data is processed.