【发布时间】:2014-09-15 22:46:19
【问题描述】:
我正在使用 Applescript 通过为 Applescript 分配键盘快捷方式将 Outlook 中的电子邮件移动到文件夹。这很好用,我正在尝试创建另一个脚本,但将我收件箱中的电子邮件移动到不在我收件箱正下方的子文件夹中。
查看下面的脚本。注释掉的行有效,但我尝试分配子文件夹的行中断了。
如何在 Applescript 中分配子文件夹?我正在通过“/”尝试“MyFolder/MySubfolder”,但这不起作用。
on run {}
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 "MyFolder" of folder "Inbox" of theAccount
set archiveFolder to folder "MyFolder/MySubfolder" of folder "Inbox" of theAccount
repeat with aMessage in msgSet
move aMessage to archiveFolder
end repeat
end tell
结束运行
【问题讨论】:
标签: email outlook applescript subdirectory