跳到主要內容

如何在Outlook中發送電子郵件之前獲得提示或確認?

很多時候,您已經發送了一封電子郵件,並意識到您錯過了一些重要的內容,或者幾秒鐘後在電子郵件中出現了一些錯誤。 如何避免在Outlook中發送令人尷尬的電子郵件? 實際上,您可以在Outlook中單擊“發送”按鈕後重新確認發送電子郵件。 本文中的方法可以幫助您顯示問題。

在發送帶有VBA代碼的電子郵件之前獲得提示或確認


在發送帶有VBA代碼的電子郵件之前獲得提示或確認

下面的VBA代碼可以幫助您在Outlook中點擊“發送”按鈕後重新確認電子郵件的發送。 請執行以下操作。

1。 按 其他 + F11 鍵打開 Microsoft Visual Basic for Applications 窗口。

2。 在裡面 Microsoft Visual Basic for Applications 窗口,請雙擊以打開 本次展望會議 代碼窗口,然後將下面的VBA代碼複製到代碼窗口中。

VBA代碼:在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。 按 其他 + Q 關閉鍵 Microsoft Visual Basic for Applications 窗口。

從現在開始,當你點擊 送出 按鈕在 Outlook 中發送電子郵件,將彈出一個確認對話框,如下圖所示。 點選 OK 若要傳送此電子郵件,請按一下 取消 繼續撰寫電子郵件。

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!
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