1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

pop up a reminding when deleting emails in Outlook

Discussion in 'All Other Software' started by Maciej, May 11, 2017.

Thread Status:
Not open for further replies.
Advertisement
  1. Maciej

    Maciej Thread Starter

    Joined:
    May 11, 2017
    Messages:
    1
    hello,

    It seems that outlook will pop up a warning box only when permanently deleting emails, if I just delete a email in inbox, there are no any reminding for me . But as I have a lot of folders in outlook, it will be so much trouble to me if I delete or move a email by mistake, and want to find it back.

    So can I get a reminding even when deleting or moving emails in Outlook? That will be good to me. Thanks.

    By the way, I'm using outlook2010.
     
  2. dvk01

    dvk01 Moderator Malware Specialist

    Joined:
    Dec 14, 2002
    Messages:
    56,219
    First Name:
    Derek
    only for permanently deleting them not for moving
    file/options/advanced scroll to the bottom ( other section) and check the alert on delete box
    outlook automatically moves deleted items to the deleted items folder not permanently deletes except for junk items in junk mail folder
     
  3. Yauetry

    Yauetry

    Joined:
    May 16, 2017
    Messages:
    1
    Hi,

    I think you can write VBA code to do that . Below is a sample macro.

    Code:
    'Take mail item as an example
    Public WithEvents objExplorer As Outlook.Explorer
    Public WithEvents objInspectors As Outlook.Inspectors
    Public WithEvents objMail As Outlook.MailItem
    Public strMsg As String
    Public nWarning As Integer
    
    Private Sub Application_Startup()
        Set objExplorer = Outlook.Application.ActiveExplorer
        Set objInspectors = Outlook.Application.Inspectors
    End Sub
    
    'Get warned before moving
    Private Sub objExplorer_BeforeItemPaste(ClipboardContent As Variant, ByVal Target As MAPIFolder, Cancel As Boolean)
        strMsg = "Are you sure to move this email?"
        nWarning = MsgBox(strMsg, vbExclamation + vbYesNo, "Confirm Mail Movement")
        If nWarning = vbYes Then
           Cancel = False
        Else
           Cancel = True
        End If
    End Sub
    
    Private Sub objInspectors_NewInspector(ByVal Inspector As Inspector)
        If Inspector.CurrentItem.Class = olMail Then
           Set objMail = Inspector.CurrentItem
        End If
    End Sub
    
    'Get warned before deleting
    Private Sub objMail_BeforeDelete(ByVal Item As Object, Cancel As Boolean)
        strMsg = "Are you sure to delete this email?"
        nWarning = MsgBox(strMsg, vbExclamation + vbYesNo, "Confirm Mail Deletion")
     
        If nWarning = vbYes Then
           Cancel = False
        Else
           Cancel = True
        End If
    End Sub
    You can change the item to what you need . If you specify the other items, like tasks, you should use:

    Code:
    Public WithEvents objTask As Outlook.TaskItem
    Code:
    If Inspector.CurrentItem.Class = olTask Then
       Set objTask = Inspector.CurrentItem
    End If
    Code:
    Private Sub objTask_BeforeDelete(ByVal Item As Object, Cancel As Boolean)
     
  4. Bill908

    Bill908

    Joined:
    May 15, 2017
    Messages:
    4
    The non-permanently deleted emails will be replaced in the "Deleted Items" and they can be accessed and found there. Then for the emails move to other folders by mistake can be right away canceled by press the button of Undo. But have no idea to recovery the email movement after a period of time.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Tags:
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1189826

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice