我想使用Apple脚本在MAC计算机中循环播放outlook 2011的所有文件夹(意味着只是一种自动化)。
我有脚本在运行时抛出错误。
tell application "Microsoft Outlook"
set thisAccount to exchange account "Sigmaco"
set thisFolders to mail folder of thisAccount
end tell
*tell application "Microsoft Outlook" to set folderList to the folders*
repeat with nextFolder in folderList
my ProcessFolder(nextFolder, outputFolder)
end repeat
但粗体样式的行会引发错误,它无法遍历所有文件夹。
请帮忙......
答案 0 :(得分:1)
因为帐户可以具有相同的名称(假设)您必须先指定一个,然后像这样向下钻取
tell application "Microsoft Outlook"
repeat with afolder in (mail folders of (first exchange account whose name is "Sigmaco"))
log (get name of afolder)
end repeat
end tell
如果您要遍历所有帐户的所有文件夹,可以跳过一些钻孔
tell application "Microsoft Outlook"
repeat with afolder in mail folders
-- do stuff
end repeat
end tell