Hoppa till huvudinnehåll

Hur avvisar jag automatiskt mötesinbjudningar från specifika personer i Outlook? 

I Outlook kan vi skapa en regel för att avvisa vissa mötesinbjudningar från specifika personer automatiskt, men hur ska man hantera det? Denna artikel kommer att introducera en metod i detalj.

Avvisa mötesinbjudningar från specifika personer automatiskt i Outlook

Avvisa mötesinbjudningar från specifika personer automatiskt och ta bort mötet från kalendern också


Avvisa mötesinbjudningar från specifika personer automatiskt i Outlook

Gör med följande steg för att slutföra det här jobbet:

1. Först bör du skapa en meddelandemall för avvisande mötesinbjudningar. I Meddelande fönstret, skriv meddelandet du vill skicka för att avvisa mötesinbjudningarna. Se skärmdump:

2. Spara sedan meddelandet som mallformat, klicka Fil > Spara somI Spara som i fönstret, ange ett namn för meddelandet i Filnamn textruta och välj sedan Outlook-mall (*. Ofta) från Spara som rullgardinsmeny, se skärmdump:

Anmärkningar: När du väljer Outlook-mall (*. Ofta), en standardmapp för användarmall öppnas.

3. Klicka sedan Save knappen för att spara meddelandemallen och stänga meddelandefönstret.

4. Och sedan kan du skapa en regel. var god klicka regler > Hantera regler och varningar under Hem flik, se skärmdump:

5. I Regler och varningar dialogrutan, klicka Ny regel från E-postregler flik, se skärmdump:

6. I poppade ut Regelguiden, Klicka Tillämpa regel på meddelande jag får alternativet under Börja från en tom regel avsnitt, se skärmdump:

7. Klicka sedan Nästa , och i dialogrutan poppade ut, kontrollera från personer eller offentlig grupp i Steg 1: Välj villkor och klicka sedan på textlänken personer eller offentlig grupp att öppna Regeladress dialogrutan och välj de personer som du vill avvisa mötet från, se skärmdump:

8. Klicka OK knappen, fortfarande i denna dialogruta, bläddra för att kontrollera vilket är en mötesinbjudan eller uppdatering alternativ från Steg 1: Välj villkor listruta, se skärmdump:

9. Fortsätt klicka Nästa i följande dialogruta:

(1.) Kontrollera svara med en viss mall alternativet i Steg 1: Välj åtgärder listruta;

(2.) Klicka sedan på textlänken en specifik mall att öppna Välj en svarsmall dialog ruta;

(3.) I Välj en svarsmall dialogrutan, välj Användarmallar i Filsystem från Titta in falla ner;

(4.) Välj sedan det meddelandens namn du har skapat just nu;

(5.) Klicka på Öppen knapp.

10. Gå tillbaka till den ursprungliga dialogrutan, fortsätt kontrollera radera det alternativet i Steg 1: Välj åtgärder listruta, se skärmdump:

11. Klicket Nästa > Nästa för att gå till sista steg-dialogrutan. I Finish regelinställningsavsnitt, ange ett namn för denna regel och kontrollera Aktivera denna regel alternativ från Steg 2: Konfigurera regelalternativ, se skärmdump:

12. Klicka Finish för att avsluta denna regel och klicka sedan på OK för att stänga dialogrutan.

13. Från och med nu skickas ett avvisande e-postmeddelande till honom automatiskt när mötet tas emot från denna specifika person och mötesmeddelandet kommer också att raderas.


Avvisa mötesinbjudningar från specifika personer automatiskt och ta bort mötet från kalendern också

Den första metoden hjälper till att skicka ett e-postmeddelande som talar om för personen att du inte kommer att delta i mötet, men mötena kommer alltid att visas i din kalender. Om du behöver radera mötena som visas i din kalender samtidigt kan följande VBA-kod göra dig en tjänst.

1. Håll ner ALT + F11 nycklar för att öppna Microsoft Visual Basic för applikationer fönster.

2. I Microsoft Visual Basic för applikationer dubbelklicka ThisOutlookSession från Project1 (VbaProject.OTM) rutan för att öppna modulen och sedan kopiera och klistra in följande kod i den tomma modulen.

VBA-kod: Avvisa automatiskt mötesinbjudningar och ta bort möten från kalendern också:

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. Spara och stäng sedan detta kodfönster. Från och med nu, om det finns möten från denna specifika person, kommer han att få ett avvisat e-postmeddelande och mötet raderas automatiskt från din kalender.


Bästa kontorsproduktivitetsverktyg

Kutools för Outlook - Över 100 kraftfulla funktioner för att överladda din Outlook

🤖 AI Mail Assistant: Instant proffs-e-postmeddelanden med AI-magi – ett klick för geniala svar, perfekt ton, flerspråkig behärskning. Förvandla e-post utan ansträngning! ...

📧 Email Automation: Frånvaro (tillgänglig för POP och IMAP)  /  Schemalägg Skicka e-post  /  Auto CC/BCC enligt regler när du skickar e-post  /  Automatisk vidarebefordran (avancerade regler)   /  Lägg automatiskt till hälsning   /  Dela automatiskt e-postmeddelanden med flera mottagare i individuella meddelanden ...

📨 Email Management: Hämta enkelt e-postmeddelanden  /  Blockera bluff-e-postmeddelanden av ämnen och andra  /  Ta bort duplicerade e-postmeddelanden  /  Avancerad Sökning  /  Konsolidera mappar ...

📁 Bilagor ProBatch Spara  /  Batch lossa  /  Batchkomprimera  /  Automatisk sparning   /  Auto Lossa  /  Automatisk komprimering ...

🌟 Gränssnittsmagi: 😊 Fler vackra och coola emojis   /  Öka din Outlook-produktivitet med flikar  /  Minimera Outlook istället för att stänga ...

👍 Underverk med ett klick: Svara alla med inkommande bilagor  /   E-postmeddelanden mot nätfiske  /  🕘Visa avsändarens tidszon ...

👩🏼‍🤝‍👩🏻 Kontakter och kalender: Lägg till kontakter i grupp från valda e-postmeddelanden  /  Dela upp en kontaktgrupp till individuella grupper  /  Ta bort påminnelser om födelsedag ...

Över 100 funktioner Vänta på din utforskning! Klicka här för att upptäcka mer.

Läs mer       Gratis nedladdning      Inköp
 

 

 

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