在 outlook 2011 中,如何使用 applescript 从系列中获取发生事件?

In outlook 2011, how can I get an occurrence event out of a series using applescript?

在 outlook 2011 中,我尝试使用以下代码从一系列事件中获取单个事件,但它显示错误“"Microsoft Outlook got an error: The specified object is a property, not an element." number -10008”。出了什么问题?

tell application "Microsoft Outlook"
    activate
    tell calendar 3
        tell calendar event 1
            get occurrence of at date "Wednesday 29 April 2015 00:00:00"
        end tell
    end tell
end tell

这是一个错误,当事件的重复发生是假的,或者日期的时间错误(必须是事件开始日期的时间)或者当天没有发生时,就会出现这个错误。

试试这个脚本,(更改第 2 行的主题)

set tdate to date "Wednesday 29 April 2015 00:00:00"
set event_subject to "some title"
tell application "Microsoft Outlook"
    set myEvent to first calendar event of calendar 3 whose its subject is event_subject and its is recurring is true
    set sdate to start time of myEvent
    tell me to set time of tdate to time of sdate
    try
        set thisCalEvent to get occurrence of myEvent at tdate
    on error
        return "No occurrence of this event at " & tdate
    end try
    return thisCalEvent
end tell