跳到主要內容

如何自動拒絕來自Outlook中特定人員的會議邀請? 

在Outlook中,我們可以創建一個規則來自動拒絕來自特定人員的一些會議邀請,但是,如何處理呢? 本文將詳細介紹一種方法。

在Outlook中自動拒絕來自特定人員的會議邀請

自動拒絕特定人員的會議邀請,並從日曆中刪除會議


在Outlook中自動拒絕來自特定人員的會議邀請

請執行以下步驟來完成此工作:

1。 首先,您應該為拒絕會議邀請創建一個消息模板。 在裡面 您的留言 窗口中,鍵入要發送的拒絕會議邀請的消息。 看截圖:

2。 然後將郵件另存為模板格式,請單擊 文件 > 另存為另存為 窗口中,將消息的名稱輸入到 文件名 文本框,然後選擇 Outlook模板(* .oft) 來自 保存類型 下拉列表,請參見屏幕截圖:

備註:選擇時 Outlook模板(* .oft), 將打開一個默認的用戶模板文件夾。

3。 然後點擊 節省 按鈕保存消息模板,然後關閉消息窗口。

4。 然後,您可以創建一個規則。 請點擊 規則 > 管理規則和警報首頁 標籤,請參見屏幕截圖:

5。 在 規則和警報 對話框,單擊 新規則 來自 電子郵件規則 標籤,請參見屏幕截圖:

6。 在彈出 規則嚮導點擊此處成為Trail Hunter 對收到的郵件應用規則 選項下 從空規則開始 部分,請參見屏幕截圖:

7。 然後點擊 下一頁 按鈕,然後在彈出的對話框中,從 步驟1:選擇條件 列錶框,然後單擊文本鏈接 人或公共團體 打開 規則地址 對話框,然後選擇要拒絕會議的人員,請參見屏幕截圖:

8。 點擊 OK 按鈕,仍在此對話框中,請滾動查看 這是會議邀請或更新 選項從 步驟1:選擇條件 列錶框,請參見屏幕截圖:

9。 繼續點擊 下一頁 按鈕,在以下對話框中:

(1.)檢查 使用特定模板回复 選項 步驟1:選擇動作 列錶框;

(2.)然後單擊文本鏈接 一個特定的模板 打開 選擇一個回复模板 對話框;

(3.)在 選擇一個回复模板 對話框中選擇 中的用戶模板 文件系統 來自 在看 落下;

(4.)然後選擇您剛剛創建的消息名稱;

(5.)點擊 已提交 按鈕。

10。 返回原始對話框,繼續檢查 刪除它 在選項 步驟1:選擇動作 列錶框,請參見屏幕截圖:

11。 點擊 下一頁 > 下一頁 進入最後一步對話框。 在裡面 規則設置部分,為此規則指定一個名稱,然後檢查 啟用此規則 選項從 步驟2:設定規則選項,請參見屏幕截圖:

12。 點擊 按鈕完成此規則,然後單擊 OK 關閉對話框。

13。 從現在開始,當從此特定人員處接收會議時,拒絕電子郵件將自動發送給他,會議消息也將被刪除。


自動拒絕特定人員的會議邀請,並從日曆中刪除會議

第一種方法有助於發送一封電子郵件,告訴對方您將不參加會議,但會議將始終顯示在您的日曆中。 如果您需要同時刪除日曆中出現的會議,下面的 VBA 代碼可以幫到您。

1。 按住 ALT + F11 鍵打開 Microsoft Visual Basic for Applications 窗口。

2。 在 Microsoft Visual Basic for Applications 窗口,雙擊 本次展望會議 來自 Project1(VbaProject.OTM) 窗格以打開模塊,然後將以下代碼複製並粘貼到空白模塊中。

VBA 代碼:自動拒絕會議邀請並從日曆中刪除會議:

Private Sub Application_NewMailEx(ByVal EntryIDCollection As String)
Dim xEntryIDs
Dim xItem
Dim i As Integer
Dim xMeeting As MeetingItem, xMeetingDeclined As MeetingItem
Dim xAppointmentItem As AppointmentItem
On Error Resume Next
xEntryIDs = Split(EntryIDCollection, ",")
For i = 0 To UBound(xEntryIDs)
    Set xItem = Application.Session.GetItemFromID(xEntryIDs(i))
    If xItem.Class = olMeetingRequest Then
        Set xMeeting = xItem
        xMeeting.ReminderSet = False
        If VBA.LCase(xMeeting.SenderEmailAddress) = VBA.LCase("") Then 'Specify the person you need
            Set xAppointmentItem = xMeeting.GetAssociatedAppointment(True)
            xAppointmentItem.ReminderSet = False
            Set xMeetingDeclined = xAppointmentItem.Respond(olMeetingDeclined)
            xMeetingDeclined.Body = "Dear, " & vbCrLf & _
                                    "I am not at office. " & vbCrLf & _
                                    "I'm sorry that I will not attend the meeting invitations."
            xMeetingDeclined.Send
            xMeeting.Delete
        End If
    End If
Next
End Sub

3. 然後,保存並關閉此代碼窗口。 從現在開始,如果此特定人員有會議,他將收到一封拒絕的電子郵件,並且會議將自動從您的日曆中刪除。


最佳辦公生產力工具

Kutools for Outlook - 超過 100 種強大的功能可增強您的 Outlook

🤖 人工智慧郵件助手: 具備人工智慧魔力的即時專業電子郵件——一鍵天才回覆、完美語調、多語言掌握。輕鬆改變電子郵件! ……

📧 電子郵件自動化: 外出(適用於 POP 和 IMAP)  /  安排發送電子郵件  /  發送電子郵件時按規則自動抄送/密件副本  /  自動轉送(進階規則)   /  自動添加問候語   /  自動將多收件者電子郵件拆分為單獨的訊息 ...

📨 電子郵件管理: 輕鬆回憶電子郵件  /  按主題和其他人阻止詐騙電子郵件  /  刪除重複的電子郵件  /  進階搜索  /  合併資料夾 ...

📁 附件專業版批量保存  /  批量分離  /  批量壓縮  /  自動保存   /  自動分離  /  自動壓縮 ...

🌟 介面魔法: 😊更多又漂亮又酷的表情符號   /  使用選項卡式視圖提高 Outlook 工作效率  /  最小化 Outlook 而不是關閉 ...

👍 一鍵奇蹟: 使用傳入附件回覆全部  /   反網路釣魚電子郵件  /  🕘顯示寄件者的時區 ...

👩🏼‍🤝‍👩🏻 通訊錄和行事曆: 從選定的電子郵件中大量新增聯絡人  /  將聯絡人群組拆分為各組  /  刪除生日提醒 ...

超過 100特點 等待您的探索! 按此處了解更多。

閱讀更多       免費下載      購買
 

 

 

Comments (33)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Good morning, the code I pasted below erases the email but not the calendar event.

Scenario is a meeting forwarding to a DL that contains my personal email . At this moment I receive the event in both the calendars, rightly to the shared calendars connected to the DL, but also to my personal agenda, I would not.

Please could you help me with the code?

thx
Francesco


Private Sub Application_NewMailEx(ByVal EntryIDCollection As String)
Dim xEntryIDs
Dim xItem
Dim i As Integer
Dim xMeeting As MeetingItem, xMeetingDeclined As MeetingItem
Dim xAppointmentItem As AppointmentItem
On Error Resume Next
xEntryIDs = Split(EntryIDCollection, ",")
For i = 0 To UBound(xEntryIDs)
Set xItem = Application.Session.GetItemFromID(xEntryIDs(i))
If xItem.Class = olMeetingRequest Then
Set xMeeting = xItem
xMeeting.ReminderSet = False
If VBA.LCase(xMeeting.SenderEmailAddress) = VBA.LCase("") Then
Set xAppointmentItem = xMeeting.GetAssociatedAppointment(True)
xAppointmentItem.Delete
xMeeting.Delete
End If
End If
Next
End Sub
This comment was minimized by the moderator on the site
Buongiorno, con il codice sotto mi viene eliminata la mail ricevuta ma non l'evento nel calendario personale.

Lo scenario è inoltro di un meeting ad una DL a cui è collegato il mio account. Al momento ricevo l'evento sia nel calendario condiviso collegato alla DL (corretto!) sia nel mio personale, dal quale invece non vorrei vederlo.

Potete aiutarmi?

grazie
Francesco


Private Sub Application_NewMailEx(ByVal EntryIDCollection As String)
Dim xEntryIDs
Dim xItem
Dim i As Integer
Dim xMeeting As MeetingItem, xMeetingDeclined As MeetingItem
Dim xAppointmentItem As AppointmentItem
On Error Resume Next
xEntryIDs = Split(EntryIDCollection, ",")
For i = 0 To UBound(xEntryIDs)
Set xItem = Application.Session.GetItemFromID(xEntryIDs(i))
If xItem.Class = olMeetingRequest Then
Set xMeeting = xItem
xMeeting.ReminderSet = False
If VBA.LCase(xMeeting.SenderEmailAddress) = VBA.LCase("") Then
Set xAppointmentItem = xMeeting.GetAssociatedAppointment(True)
xAppointmentItem.Delete
xMeeting.Delete
End If
End If
Next
End Sub
This comment was minimized by the moderator on the site
thanks for the great advice. How does the VBA need to be changed if I don't want to auto-decline invites from specific senders, but if I want invites to be declined (and removed!) that are sent to me as a member of a distribution list? I don't want to leave the distribution list, but since I work remotely, on-site meetings don't make sense to me, but the pure mails from this particular group do.
This comment was minimized by the moderator on the site
Hallo

Werden auch Terminanfragen gelöscht, die "im Auftrag von" abgelehnt und gelöscht?
Bin mir nicht ganz sicher, ob der Code funktioniert, da Termine die "im Auftrag von" nicht gelöscht werden, obwohl der/die Absender ebenfalls aufgeführt ist.

Private Sub Application_NewMailEx(ByVal EntryIDCollection As String)
Dim xEntryIDs
Dim xItem
Dim i As Integer
Dim xMeeting As MeetingItem, xMeetingDeclined As MeetingItem
Dim xAppointmentItem As AppointmentItem
On Error Resume Next
xEntryIDs = Split(EntryIDCollection, ",")
For i = 0 To UBound(xEntryIDs)
Set xItem = Application.Session.GetItemFromID(xEntryIDs(i))
If xItem.Class = olMeetingRequest Then
Set xMeeting = xItem
xMeeting.ReminderSet = False
If VBA.InStr(VBA.LCase(", "), VBA.LCase(xMeeting.SenderEmailAddress)) <> 0 Then 'Specify the person you need
Set xAppointmentItem = xMeeting.GetAssociatedAppointment(True)
'xAppointmentItem.ReminderSet = False
'Set xMeetingDeclined = xAppointmentItem.Respond(olMeetingDeclined)
'xMeetingDeclined.Body = "Dear, " & vbCrLf & _
"I am not at office. " & vbCrLf & _
"I'm sorry that I will not attend the meeting invitations."
'xMeetingDeclined.Send
xAppointmentItem.Delete
xMeeting.Delete
End If
End If
Next
End Sub
This comment was minimized by the moderator on the site
Wie würde der Codeaussehen, wenn man dort mehrere Empfänger hinterlegen möchte?

Gruß
Thomas
This comment was minimized by the moderator on the site
Hallo

Wie würde der Code aussehen, wenn ich mehrere Absender habe, dessen Termin ich ohne Antwort ablehnen will?

Danke schön
This comment was minimized by the moderator on the site
buen dia,
¿hay posibilidad de añadir una condición para el rechazo de la invitación?
me refiero a validar si a la hora de la reunión se está libre o no, en caso de tener otra reunión si rechazar automáticamente.

gracias
This comment was minimized by the moderator on the site
Hi, skyyang
Thank you for your information.

I have one question about this.
If i don't want to repley email of attending, which code can i use ?
Could you please update with this option?
This comment was minimized by the moderator on the site
Hello, dedn,
To remove the meetings but don't send a response, please apply the below code:
Private Sub Application_NewMailEx(ByVal EntryIDCollection As String)
Dim xEntryIDs
Dim xItem
Dim i As Integer
Dim xMeeting As MeetingItem, xMeetingDeclined As MeetingItem
Dim xAppointmentItem As AppointmentItem
On Error Resume Next
xEntryIDs = Split(EntryIDCollection, ",")
For i = 0 To UBound(xEntryIDs)
    Set xItem = Application.Session.GetItemFromID(xEntryIDs(i))
    If xItem.Class = olMeetingRequest Then
        Set xMeeting = xItem
        xMeeting.ReminderSet = False
        If VBA.LCase(xMeeting.SenderEmailAddress) = VBA.LCase("") Then 'Specify the person you need
            Set xAppointmentItem = xMeeting.GetAssociatedAppointment(True)
            'xAppointmentItem.ReminderSet = False
            'Set xMeetingDeclined = xAppointmentItem.Respond(olMeetingDeclined)
            'xMeetingDeclined.Body = "Dear, " & vbCrLf & _
                                    "I am not at office. " & vbCrLf & _
                                    "I'm sorry that I will not attend the meeting invitations."
            'xMeetingDeclined.Send
            xAppointmentItem.Delete
            xMeeting.Delete
        End If
    End If
Next
End Sub

Please have a try, hope it can help you!
This comment was minimized by the moderator on the site
Hallo
Danke für den Code.
Wie müßte die Zeile 14 aussehen, wenn man mehrere Absender hat?

Danke schön.
This comment was minimized by the moderator on the site
Hello, Thomas,
If you want to set multiple senders in the code, please apply the below code:
Private Sub Application_NewMailEx(ByVal EntryIDCollection As String)
  Dim xEntryIDs
  Dim xItem
  Dim i As Integer
  Dim xMeeting As MeetingItem, xMeetingDeclined As MeetingItem
  Dim xAppointmentItem As AppointmentItem
  On Error Resume Next
  xEntryIDs = Split(EntryIDCollection, ",")
  For i = 0 To UBound(xEntryIDs)
      Set xItem = Application.Session.GetItemFromID(xEntryIDs(i))
      If xItem.Class = olMeetingRequest Then
          Set xMeeting = xItem
          xMeeting.ReminderSet = False
          If VBA.InStr(VBA.LCase(", "), VBA.LCase(xMeeting.SenderEmailAddress)) <> 0 Then 'Specify the person you need
              Set xAppointmentItem = xMeeting.GetAssociatedAppointment(True)
              'xAppointmentItem.ReminderSet = False
              'Set xMeetingDeclined = xAppointmentItem.Respond(olMeetingDeclined)
              'xMeetingDeclined.Body = "Dear, " & vbCrLf & _
                                      "I am not at office. " & vbCrLf & _
                                      "I'm sorry that I will not attend the meeting invitations."
              'xMeetingDeclined.Send
              xAppointmentItem.Delete
              xMeeting.Delete
          End If
      End If
  Next
End Sub


Note: If there are more senders need to be added, please add the emails into this script If VBA.InStr(VBA.LCase(", "), VBA.LCase(xMeeting.SenderEmailAddress)) <> 0 Then

Please try, hope it can help you!
This comment was minimized by the moderator on the site
Hi, skyyang
Thank you for your information.

I have one question about this.
If i don't want to repley email of attending, which code can i use ?
Could you please update with this option?
This comment was minimized by the moderator on the site
skyyang I get lots of emails from an automated and unmanned inbox, so I don't want to send a reply to them about declining the meeting. Would I instead just cut out the .Body and .Send segments and use this?:
Private Sub Application_NewMailEx(ByVal EntryIDCollection As String)
Dim xEntryIDs
Dim xItem
Dim i As Integer
Dim xMeeting As MeetingItem, xMeetingDeclined As MeetingItem
Dim xAppointmentItem As AppointmentItem
On Error Resume Next
xEntryIDs = Split(EntryIDCollection, ",")
For i = 0 To UBound(xEntryIDs)
Set xItem = Application.Session.GetItemFromID(xEntryIDs(i))
If xItem.Class = olMeetingRequest Then
Set xMeeting = xItem
xMeeting.ReminderSet = False
If VBA.LCase(xMeeting.SenderEmailAddress) = VBA.LCase("") Then 'Specify the person you need
Set xAppointmentItem = xMeeting.GetAssociatedAppointment(True)
xAppointmentItem.ReminderSet = False
Set xMeetingDeclined = xAppointmentItem.Respond(olMeetingDeclined)
xMeeting.Delete
End If
End If
Next
End Sub


Cheers,
This comment was minimized by the moderator on the site
Hello, D
What do you mean the automated and unmanned inbox?
Could you explain it more detailed, thank you!
This comment was minimized by the moderator on the site
Hello,

Thank you for sharing. Could you please update the VBL with more options? I need to decline and remove from my calendar meeting invites with the following:
- from specific people - already covered in your VBL
- with specific words in the body
- with specific words in the subject
- except if sent to people or public group
- except if my name is in the To or CC box
- except if it marked as importance
- except if the subject contains specific words

About this part:
f VBA.LCase(xMeeting.SenderEmailAddress) = VBA.LCase("") Then 'Specify the person you need

I will replace the with the sender I need to filter and decline the invites from but I don't understand if I need to replace this part with anything specific " Specify the person you need" or just leave as is?
This comment was minimized by the moderator on the site
I have the same question as Dan about "Then 'Specify the person you need"

Thank you!
This comment was minimized by the moderator on the site
Hello, Rriela,
In the code, you juse need to change the sender address "" to the sender that you want to decline the invites from.
'Specify the person you need :This text is only annotation, you can leave or delete it as you need.
This comment was minimized by the moderator on the site
Okay thank you! I did mine like this:

Private Sub Application_NewMailEx(ByVal EntryIDCollection As String)
Dim xEntryIDs
Dim xItem
Dim i As Integer
Dim xMeeting As MeetingItem, xMeetingDeclined As MeetingItem
Dim xAppointmentItem As AppointmentItem
On Error Resume Next
xEntryIDs = Split(EntryIDCollection, ",")
For i = 0 To UBound(xEntryIDs)
Set xItem = Application.Session.GetItemFromID(xEntryIDs(i))
If xItem.Class = olMeetingRequest Then
Set xMeeting = xItem
xMeeting.ReminderSet = False
If VBA.LCase(xMeeting.SenderEmailAddress) = VBA.LCase("") Then 'Specify the person you need
Set xAppointmentItem = xMeeting.GetAssociatedAppointment(True)
xAppointmentItem.ReminderSet = False
Set xMeetingDeclined = xAppointmentItem.Respond(olMeetingDeclined)
xMeetingDeclined.Body = "Dear Fake, " & vbCrLf & _
"I will not attend this meeting. Thank you."
xMeetingDeclined.Send
xMeeting.Delete
End If
End If
Next
End Sub

But I wonder if there is a way to decline the meeting and delete it from my calendar WITHOUT sending a response? Can I just delete this part:
Set xMeetingDeclined = xAppointmentItem.Respond(olMeetingDeclined)
xMeetingDeclined.Body = "Dear Fake, " & vbCrLf & _
"I will not attend this meeting. Thank you."

Thank you so much for your help
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations