RDCOMClient和Outlook:预订会议

时间:2017-04-28 21:08:44

标签: r rdcomclient

我试图通过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() 

是否以及如何运作的任何想法?

2 个答案:

答案 0 :(得分:0)

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

答案 1 :(得分:0)

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

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()

那应该带你到那里。