2010-03-18 109 views
3

是否有VB宏或某種附加組件可讓我自動接受發件人或文件夾在Outlook中的邀請?自動接受展望VBA

我在想這樣做VB腳本這個,但我不想重新發明輪子呢?

+0

我認爲這是一個前景設置,不需要宏。我在工作中使用它,當我進入工作環境時,我會嘗試更新技術信息。 – 2011-07-02 04:18:21

+0

@Aaron您可以將Outlook設置爲自動接受所有會議請求。您不能根據OP的要求修改它。轉到工具>選項>日曆選項>資源調度...>點擊「自動接受會議請求和處理取消」 – JimmyPena 2011-11-21 18:28:59

回答

1

我已經在過去使用這種,這樣當你從certian發件人和ITA的會議邀請或更新接受它它觸發添加此子進入VBA頁面和電線了您的規則。

Sub AutoAccept(ByRef Item As Outlook.MeetingItem) 

    Dim strID As String 
    Dim olNS As Outlook.NameSpace 
    Dim oMeetingItem As Outlook.MeetingItem 
    Dim oResponse As Outlook.MeetingItem 
    Dim oAppointment As Outlook.AppointmentItem 

    strID = Item.EntryID 

    Set olNS = Application.GetNamespace("MAPI") 
    Set oMeetingItem = olNS.GetItemFromID(strID) 
    Set oAppointment = oMeetingItem.GetAssociatedAppointment(True) 

    Set oResponse = oAppointment.Respond(olMeetingAccepted) 
    oResponse.Send 

    oAppointment.Save 
    oMeetingItem.Save 


    Set oAppointment = Nothing 
    Set oMeetingItem = Nothing 
    Set olNS = Nothing 

End Sub