问题描述
限时送ChatGPT账号..在 Outlook 2011 中,我尝试使用以下代码从一系列事件中获取单个事件,但它显示错误Microsoft Outlook 出现错误:指定的对象是属性,而不是元素."编号 -10008".出了什么问题?
In outlook 2011 I try to use the following code to get a single occurrence out of a series of events, but it shows the error ""Microsoft Outlook got an error: The specified object is a property, not an element." number -10008". What went wrong?
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
推荐答案
这是一个bug,这个错误是在事件的重复发生为false,或者日期的时间错误时(必须是开始日期的时间)事件)或在这一天没有发生.
it's a bug, this error occurs when the recurring of the event is false, or when the time of the date is wrong (must be the time of start date of the event) or no occurrence at this day.
试试这个脚本,(改变第 2 行的主题)
Try this script, (change the subject in line 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
这篇关于在 Outlook 2011 中,如何使用 applescript 从系列中获取发生事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论