Vai al contenuto principale

Come ottenere una richiesta o una conferma prima di inviare e-mail in Outlook?

In molte volte, hai inviato un'e-mail e ti sei reso conto che ti sei perso qualcosa di importante, o qualcosa di sbagliato appare nell'e-mail pochi secondi dopo. Come evitare di inviare email imbarazzanti in Outlook? In realtà puoi riconfermare l'invio dell'email dopo aver premuto il pulsante Invia in Outlook. Il metodo in questo articolo può aiutarti a mostrare il problema.

Ricevi una richiesta o una conferma prima di inviare e-mail con codice VBA


Ricevi una richiesta o una conferma prima di inviare e-mail con codice VBA

Il seguente codice VBA può aiutarti a riconfermare l'invio di e-mail dopo aver premuto il pulsante Invia in Outlook. Si prega di fare quanto segue.

1. premi il altro + F11 chiavi per aprire il Microsoft Visual Basic, Applications Edition finestra.

2. Nel Microsoft Visual Basic, Applications Edition finestra, fare doppio clic per aprire il file Questa sessione di Outlook finestra del codice, quindi copia sotto il codice VBA nella finestra del codice.

Codice VBA: ottieni una conferma prima di inviare e-mail 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. premi il altro + Q i tasti per chiudere il file Microsoft Visual Basic, Applications Edition finestra.

D'ora in poi, quando premi il pulsante Invia pulsante per inviare un'e-mail in Outlook, verrà visualizzata una finestra di dialogo di conferma come mostrato nell'immagine sottostante. Clic OK per inviare questa e-mail, fare clic su Annulla per continuare a comporre l'email.

I migliori strumenti per la produttività in ufficio

🤖 Assistente AI di Kutools: Rivoluziona l'analisi dei dati basandosi su: Esecuzione intelligente   |  Genera codice  |  Crea formule personalizzate  |  Analizzare i dati e generare grafici  |  Richiama le funzioni di Kutools...
Funzioni popolari: Trova, evidenzia o identifica i duplicati   |  Elimina righe vuote   |  Combina colonne o celle senza perdere dati   |   Round senza formula ...
Super ricerca: VLookup a criteri multipli    VLookup a valori multipli  |   VLookup su più fogli   |   Ricerca fuzzy ....
Elenco a discesa avanzato: Crea rapidamente un elenco a discesa   |  Elenco a discesa dipendente   |  Elenco a discesa a selezione multipla ....
Gestore di colonna: Aggiungi un numero specifico di colonne  |  Sposta colonne  |  Attiva/disattiva lo stato di visibilità delle colonne nascoste  |  Confronta intervalli e colonne ...
Funzionalità in primo piano: Messa a fuoco della griglia   |  Vista di progettazione   |   Grande barra delle formule    Gestore di cartelle di lavoro e fogli   |  Resource Library (Testo automatico)   |  Date picker   |  Combina fogli di lavoro   |  Crittografa/decrittografa le celle    Invia e-mail per elenco   |  Super filtro   |   Filtro speciale (filtro grassetto/corsivo/barrato...) ...
I 15 migliori set di strumenti12 Testo Strumenti (aggiungi testo, Rimuovi personaggi, ...)   |   50+ Grafico Tipi (Diagramma di Gantt, ...)   |   40+ Pratico Formule (Calcola l'età in base al compleanno, ...)   |   19 Inserimento Strumenti (Inserisci il codice QR, Inserisci immagine dal percorso, ...)   |   12 Conversione Strumenti (Numeri in parole, Conversione di valuta, ...)   |   7 Unisci e dividi Strumenti (Combina righe avanzate, Celle divise, ...)   |   ... e altro ancora

Potenzia le tue competenze di Excel con Kutools per Excel e sperimenta l'efficienza come mai prima d'ora. Kutools per Excel offre oltre 300 funzionalità avanzate per aumentare la produttività e risparmiare tempo.  Fai clic qui per ottenere la funzionalità di cui hai più bisogno...

Descrizione


Office Tab porta l'interfaccia a schede in Office e semplifica notevolmente il tuo lavoro

  • Abilita la modifica e la lettura a schede in Word, Excel, PowerPoint, Publisher, Access, Visio e Project.
  • Apri e crea più documenti in nuove schede della stessa finestra, piuttosto che in nuove finestre.
  • Aumenta la produttività del 50% e riduce ogni giorno centinaia di clic del mouse!
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