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

编程入门 行业动态 更新时间:2024-10-09 16:31:35
本文介绍了在 Outlook 2011 中,如何使用 applescript 从系列中获取发生事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送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:关键词]

本文发布于:2023-04-17 14:47:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/915758.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   发生   事件   系列   Outlook

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!