无法使用 CDOEX 和 Exchange 2000 完成该功能

发布于 2024-10-13 01:47:36 字数 1117 浏览 7 评论 0原文

我正在尝试在 Exchange 2000 中使用 CDOEX 创建约会。代码片段来自 msdn,是 VB6。

当我到达这一行:“.DataSource.SaveToContainer iMbx.Calendar,Conn”时,我收到错误“无法完成该功能(800703eb)”

任何帮助将不胜感激!

Function CreateAppointment(StartTime As Date, _
                            EndTime As Date, _
                            Subject As String, _
                            Location As String, _
                            TextBody As String, _
                            iMbx As IMailbox) As Appointment

' Reference to Microsoft ActiveX Data Objects 2.5 Library
' Reference to Microsoft CDO for Exchange 2000 Library

    Dim iAppt       As New Appointment
    Dim Conn        As New ADODB.Connection
    Conn.Provider = "ExOLEDB.DataSource"

    'Set the appointment properties
    With iAppt
        .StartTime = StartTime
        .EndTime = EndTime
        .Subject = Subject
        .Location = Location
        .TextBody = TextBody
        'Save the appointment
        Conn.Open iMbx.BaseFolder
        .DataSource.SaveToContainer iMbx.Calendar, Conn
    End With

    Set CreateAppointment = iAppt
End Function

I am trying to create an appointment using CDOEX in Exchange 2000. The code snippet is from msdn and is VB6.

When I reach this line: ".DataSource.SaveToContainer iMbx.Calendar, Conn" I am getting error "cannot complete the function (800703eb)"

Any help will be appreciated!

Function CreateAppointment(StartTime As Date, _
                            EndTime As Date, _
                            Subject As String, _
                            Location As String, _
                            TextBody As String, _
                            iMbx As IMailbox) As Appointment

' Reference to Microsoft ActiveX Data Objects 2.5 Library
' Reference to Microsoft CDO for Exchange 2000 Library

    Dim iAppt       As New Appointment
    Dim Conn        As New ADODB.Connection
    Conn.Provider = "ExOLEDB.DataSource"

    'Set the appointment properties
    With iAppt
        .StartTime = StartTime
        .EndTime = EndTime
        .Subject = Subject
        .Location = Location
        .TextBody = TextBody
        'Save the appointment
        Conn.Open iMbx.BaseFolder
        .DataSource.SaveToContainer iMbx.Calendar, Conn
    End With

    Set CreateAppointment = iAppt
End Function

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦太阳 2024-10-20 01:47:36

我已经找到了问题和解决方案,所以这里是以防万一有人需要它:链接
另外,我还找到了挽救我生命的示例:链接

I have found the problem and solution, so here it is in case somebody needs it: link
Also, I have found examples that saved my life: link

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文