打开共享日历与访问(vba)

时间:2017-02-23 12:49:36

标签: vba ms-access access-vba

我写了一个脚本,应该在outlook中打开日历(Wartung)并添加会议。但是我的脚本中出现了“对象未找到错误”

我也试过Set outtest = outApp.CreateItem(olAppointmentItem),这只适用于我的个人日历。 “Wartung”是共享的日历。

Dim OutApp As Outlook.Application
Dim outtest As Object
Dim ZeitEnd As Date
Set OutApp = GetOutlook
Set outtest = OutApp.GetNamespace("MAPI").Folders("Meine Kalender").Items("Wartung").CreateItem(olAppointmentItem)

ZeitEnd = DateAdd("h", 4, lstZeit)

    With outtest

        .Subject = "SAP Patche: " & lstSID
        .Start = lstDat + lstZeit
        .End = lstDat + ZeitEnd
        .Body = "TEST"

        'Params not in use
            '.AllDayEvent = True
            '.MeetingStatus = olMeeting

        .Display

    End With

Set OutApp = Nothing
Set outtest = Nothing

为了更好的观点:

enter image description here

0 个答案:

没有答案