1

我正在尝试通过 R 中的脚本在 Outlook 中预订定期会议,我将每周批量运行该脚本。由于房间价格昂贵,我们目前不允许预订定期会议。我已经使用 RDCOMClient 发送自动电子邮件,所以我认为可能有一种方法可以使用该软件包来完成它。我查看了 Stack Overflow 和文档,还没有找到任何具体的内容。我想它看起来像这样:

OutApp <- COMCreate("Outlook.Application")

outMeeting = OutApp$CreateItem(0)

outMeeting[["To"]] = paste("Person1@company.com","Person2@Company.com","Room1@Company.com", sep = ";", collapse = NULL)
outMeeting[["start"]] = strptime(2017/04/28 13:30, "%Y/%m/%d %H:%M")
outMeeting[["end"]] = strptime(2017/04/28 14:30, "%Y/%m/%d %H:%M")
outMeeting[["subject"]] = "Weekly Meeting"
outMeeting[["body"]] = "Hi Team,

Attached is the weekly meeting agenda.

Thanks,
Person 3"

outMeeting$Send() 

关于这是否以及如何工作的任何想法?

4

2 回答 2

1

我知道这已经很老了,但我一直在尝试做同样的事情,我想通了。您需要执行以下操作:

OutApp <- COMCreate$("Outlook.Application")
OutMeeting <- OutApp$CreateItem(1)

OutMeeting[["Start"]] = "2019-02-22 08:00"
OutMeeting[["Subject"]] = "Weekly Meeting"
OutMeeting[["Body"]] = "Hi Team,

Attached is the weekly meeting agenda.

Thanks,
Person 3"
OutMeeting[["Duration"]] = "60"
# MeetingStatus is key to this - that's how it can be sent to others as an invite
OutMeeting[["MeetingStatus"]] = "1"
OutMeeting[["Recipients"]]$Add("Person1@company.com")
OutMeeting[["Recipients"]]$Add("Person2@Company.com")
OutMeeting[["Recipients"]]$Add("Room1@Company.com")
OutMeeting$Save()
OutMeeting$Send()

那应该能让你到达那里。

于 2019-02-22T00:13:12.103 回答
0

尝试使用 outMeeting = OutApp$CreateItem( 1 ) 创建日历项目。希望它会帮助你。

于 2017-06-20T17:40:31.810 回答