【问题标题】:Applescript for Outlook 2011 to iterate through all folders such as inbox etcApplescript for Outlook 2011 遍历所有文件夹,如收件箱等
【发布时间】:2014-09-21 01:13:52
【问题描述】:

我想使用 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

但粗体行会引发错误,无法遍历所有文件夹。

请帮忙...

【问题讨论】:

    标签: macos applescript outlook-2011


    【解决方案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
    

    【讨论】:

    • 它抛出错误:“miscrosoft Outlook 出现错误:无法获取每个文件夹。”每个文件夹中的编号 -1728
    • 是和交换账户,还是 imap 或 pop ?也是那个确切的名字
    • 好吧,它是交换、pop、imap、ldap 四种类型之一,请参阅更新以弄清楚
    • 好吧。你的意思是我可以试试 1) ....((第一个交换帐户 .... 2) 的邮件文件夹 (第一个 pop 帐户 3) (第一个 imap 帐户的邮件文件夹等...跨度>
    • 那么你就知道是哪一个了,我正在尝试编写一些代码,可以弄清楚并继续,但你可以这样做并继续前进:)
    猜你喜欢
    • 1970-01-01
    • 2019-01-26
    • 1970-01-01
    • 1970-01-01
    • 2019-01-17
    • 2011-07-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多