Ga naar hoofdinhoud

Hoe krijg ik een prompt of bevestiging voordat ik e-mails verstuurt in Outlook?

Vaak heb je een e-mail gestuurd en realiseerde je je dat je iets belangrijks mist, of dat er een paar seconden later iets fout in de e-mail verschijnt. Hoe voorkom je dat gênante e-mail in Outlook wordt verzonden? Eigenlijk kunt u het verzenden van de e-mail opnieuw bevestigen nadat u op de knop Verzenden in Outlook hebt gedrukt. De methode in dit artikel kan u helpen het probleem te laten zien.

Ontvang een prompt of bevestiging voordat u e-mails met VBA-code verzendt


Ontvang een prompt of bevestiging voordat u e-mails met VBA-code verzendt

De volgende VBA-code kan u helpen om het verzenden van e-mail opnieuw te bevestigen nadat u op de knop Verzenden in Outlook hebt gedrukt. Ga als volgt te werk.

1. druk de anders + F11 toetsen om de te openen Microsoft Visual Basic voor toepassingen venster.

2. In de Microsoft Visual Basic voor toepassingen -venster, dubbelklik om het DezeOutlookSessie codevenster en kopieer vervolgens onderstaande VBA-code naar het codevenster.

VBA-code: ontvang een bevestiging voordat u e-mails verzendt in Outlook

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim xPrompt As String
Dim xOkOrCancel As Integer
On Error Resume Next
xPrompt = "Do you want to continue sending the email?"
xOkOrCancel = MsgBox(xPrompt, vbOKCancel)
If xOkOrCancel <> vbOK Then
    Cancel = True
End If
End Sub

3. druk de anders + Q toetsen om de Microsoft Visual Basic voor toepassingen venster.

Vanaf nu, wanneer je op de Verzenden knop om een ​​e-mail te verzenden in Outlook, er verschijnt een bevestigingsdialoogvenster zoals onderstaand screenshot laat zien. Klik OK Om deze e-mail te verzenden, klikt u op Annuleer om door te gaan met het opstellen van de e-mail.

Beste Office-productiviteitstools

🤖 Kutools AI-assistent: Een revolutie teweegbrengen in de data-analyse op basis van: Intelligente uitvoering   |  Genereer code  |  Aangepaste formules maken  |  Analyseer gegevens en genereer grafieken  |  Roep Kutools-functies aan...
Populaire functies: Zoek, markeer of identificeer duplicaten   |  Verwijder lege rijen   |  Combineer kolommen of cellen zonder gegevens te verliezen   |   Ronde zonder formule ...
Super opzoeken: Meerdere criteria VLookup    VLookup met meerdere waarden  |   VOpzoeken over meerdere bladen   |   Fuzzy opzoeken ....
Geavanceerde vervolgkeuzelijst: Maak snel een vervolgkeuzelijst   |  Afhankelijke vervolgkeuzelijst   |  Multi-select vervolgkeuzelijst ....
Kolom Beheerder: Voeg een specifiek aantal kolommen toe  |  Kolommen verplaatsen  |  Schakel de zichtbaarheidsstatus van verborgen kolommen in  |  Vergelijk bereiken en kolommen ...
Uitgelichte functies: Raster focus   |  Ontwerpweergave   |   Grote formulebalk    Werkmap- en bladbeheer   |  resource Library (Auto-tekst)   |  Datumkiezer   |  Combineer werkbladen   |  Cellen coderen/decoderen    Stuur e-mails per lijst   |  Super filter   |   Speciaal filter (filter vet/cursief/doorhalen...) ...
Top 15 gereedschapsets12 Tekst Tools (toe te voegen tekst, Tekens verwijderen, ...)   |   50+ tabel Types (Gantt Chart, ...)   |   40+ Praktisch Formules (Bereken leeftijd op basis van verjaardag, ...)   |   19 Invoeging Tools (QR-code invoegen, Afbeelding invoegen vanaf pad, ...)   |   12 Camper ombouw Tools (Getallen naar woorden, Currency Conversion, ...)   |   7 Samenvoegen en splitsen Tools (Geavanceerd Combineer rijen, Gespleten cellen, ...)   |   ... en meer

Geef uw Excel-vaardigheden een boost met Kutools voor Excel en ervaar efficiëntie als nooit tevoren. Kutools voor Excel biedt meer dan 300 geavanceerde functies om de productiviteit te verhogen en tijd te besparen.  Klik hier om de functie te krijgen die u het meest nodig heeft...

Omschrijving


Office-tabblad Brengt een interface met tabbladen naar Office en maakt uw werk veel gemakkelijker

  • Schakel bewerken en lezen met tabbladen in Word, Excel, PowerPoint in, Publisher, Access, Visio en Project.
  • Open en maak meerdere documenten in nieuwe tabbladen van hetzelfde venster in plaats van in nieuwe vensters.
  • Verhoogt uw productiviteit met 50% en vermindert honderden muisklikken voor u elke dag!
Comments (17)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Clicking on cancel , sends the message
This comment was minimized by the moderator on the site
Hi, I get an error message when I run this VBA code.The error is "Compile error: Sub or function not defined."
This comment was minimized by the moderator on the site
Hi the code is giving me an error saying "Compile error: Sub or Function not defined."What would be the cause for this?
This comment was minimized by the moderator on the site
The reason it doesn't work when you restart Outlook is a secuirty one - the macro is not trusted by default, you have to self certify it. Follow the instructions on this site and it will all work fine after every restart... https://www.howto-outlook.com/howto/selfcert.htm
This comment was minimized by the moderator on the site
The solution worked for me once but I couldn't get it to work for me again. Any suggestions how to do that?
This comment was minimized by the moderator on the site
The reason it doesn't work when you restart Outlook is a secuirty one - the macro is not trusted by default, you have to self certify it. Follow the instructions on this site and it will all work fine after every restart... https://www.howto-outlook.com/howto/selfcert.htm
This comment was minimized by the moderator on the site
This worked one time, after tha never worked again.
This comment was minimized by the moderator on the site
The reason it doesn't work when you restart Outlook is a secuirty one - the macro is not trusted by default, you have to self certify it. Follow the instructions on this site and it will all work fine after every restart... https://www.howto-outlook.com/howto/selfcert.htm
This comment was minimized by the moderator on the site
Hi There,

For some reason, mine, it works well only for one day. The codes don't seem to work anymore the next day, although those codes remained intact,

Anyone has such experience and know why?

Thanks.
This comment was minimized by the moderator on the site
The reason it doesn't work when you restart Outlook is a secuirty one - the macro is not trusted by default, you have to self certify it. Follow the instructions on this site and it will all work fine after every restart... https://www.howto-outlook.com/howto/selfcert.htm
This comment was minimized by the moderator on the site
Seeing same issue, any desired solution?
This comment was minimized by the moderator on the site
Same issue, it doesn't work for next day or after relaunching outlook, any solution?
This comment was minimized by the moderator on the site
Hi, i've got the same experience. Not sure yet how to solve this, i'm very new to VBA.
Would like to hear from you if you found a fix.
This comment was minimized by the moderator on the site
Hello! Very useful and it works perfectly.

Is it possible to adjust the code so that it only pops up when there is an attachment? Similarly, is it possible to adjust it so it prompts the pop-up only when the message is sent externally (not to people of the company)?
This comment was minimized by the moderator on the site
Hi There

Is it possible to get a message to come up only when an attachment is present, and only when sent externally?

Thank you very much!

Daniel
This comment was minimized by the moderator on the site
If you want the pop-up to only happen when you send to several emails, i.e. >10, how do you do that?

Oh and thanks, it works like a treat.
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