Excel 已发送约会对象

Excel 已发送约会对象,excel,vba,outlook,Excel,Vba,Outlook,Backgorund: 我需要发送约会,一切正常,但是,如果邀请已发送或未发送,我希望获得Outlook.AppointmentItem的“已发送”属性-用户在单击显示的窗口后取消或服务器问题- 已尝试解决方案: 当我读到约会有一个“this”的时候,当然,它并没有告诉我它是否被发送了,就像里面的那个一样。 我不认为提供代码会有帮助,但是,这里是: 代码: Dim olApp As Outlook.Application Dim olAgenda As Outlook.AppointmentIt

Backgorund:
我需要发送约会,一切正常,但是,如果邀请已发送或未发送,我希望获得Outlook.AppointmentItem的“已发送”属性-用户在单击显示的窗口后取消或服务器问题-


已尝试解决方案:
当我读到约会有一个“this”的时候,当然,它并没有告诉我它是否被发送了,就像里面的那个一样。
我不认为提供代码会有帮助,但是,这里是:
代码:

Dim olApp As Outlook.Application Dim olAgenda As Outlook.AppointmentItem Set olApp = New Outlook.Application Set olAgenda = olApp.CreateItem(1) With olAgenda .Subject = "Test" .Recipients.Add = "sample@domain.com" .Display On Error Resume Next Call .ItemProperties.Item("Saved") 'here is where I would need to catch the kind of "was it sent?" variable. If Err.Number = 0 Then '99. If Error MsgBox "Item Send" Else '99. If Error MsgBox "Item Not Send" End If '99. If Error End With Dim olApp作为Outlook.Application Dim olAgenda作为Outlook.AppointmentItem Set olApp=newoutlook.Application Set olAgenda=olApp.CreateItem(1) 与奥拉根达 .Subject=“测试” .Recipients.Add=”sample@domain.com" .展示 出错时继续下一步 Call.ItemProperties.Item(“Saved”)'这里是我需要捕获“was it sent?”变量的地方。 如果Err.Number=0,则为'99。如果错误 MsgBox“项目发送” 还有99年。如果错误 MsgBox“项目未发送” 一九九九年结束。如果错误 以 PS:请注意,我不喜欢后期绑定,必须添加outlook库的参考。
问题:

我怎样才能知道约会项目是否已发送?

约会本身从未发送过-它停留在日历文件夹中。仅发送
MeetingItem
对象


也就是说,使用该属性

谢谢,成功了!我必须补充一点,当您将其用作条件时,0表示它“不可用”-对于我的问题,outlook无法“发送”-1表示它可用。有关olMeetingStatus枚举的可能值,请参阅。