在使用以下VBA代码在Outlook中设置会议时,有人知道如何包括团队会议吗?
下面是我的代码:
Sub setmeeting()
Dim O As Outlook.Application
Dim OAPT As Outlook.AppointmentItem
Set O = New Outlook.Application
Set OAPT = O.CreateItem(olAppointmentItem)
OAPT.MeetingStatus = olMeeting
With OAPT
.RequiredAttendees = "abc@gmail.com"
.OptionalAttendees = "abc@gmail.com"
.Subject = "I Love VBA"
.Start = "11/21/2019 12:00:00 PM"
.End = "11/21/2019 12:30:00 PM"
.Body = "Hello World"
.Location = "Cubicle"
.Display
.Send
End With
Set OAPT = Nothing
Set O = Nothing
End Sub
答案 0 :(得分:0)
在“团队”约会中设置了很多“团队”相关属性。这些属性将约会与Teams服务器链接,我认为如果不先与Teams服务器进行通信,您将无法设置这些属性。
使用OutlookSpy(单击IMessage按钮)查看现有的Teams约会。
答案 1 :(得分:0)
Sub teammetting()
将nm设置为Outlook.AppointmentItem
设置nm = Application.CreateItem(olAppointmentItem)
nm.MeetingStatus = olMeeting
nm.Subject =“主题”
nm.Start ='format:DD / MM / YYYY HH:MM:SS AM / PM
nm.End =“”'format:DD / MM / YYYY HH:MM:SS AM / PM
nm.required与会者“被邀请者的电子邮件地址”
nm.Body =“设置电子邮件的正文”
nm.Display
SendKeys“ {F10}”,真
发送键“ H”,真
SendKeys“ TM”,真
结束子
'如果您正在执行循环,请在下一个循环开始之前添加等待时间