我使用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
结束
答案 0 :(得分:1)
好的 - 我明白了!
set topFolder to folder "Inbox" of theAccount
set subFolder to folder "MyFolder" of topFolder
set subFolder2 to folder "MySubfolder" of subFolder
答案 1 :(得分:1)
你把它们连在一起并反过来;
如,
set archiveFolder to folder "MySubfolder" of folder "MyFolder" of folder "Inbox" of theAccount