Delete redundant emails in a conversation in Outlook 2007
Problem
Outlook 2010 has the ability to delete redundant emails from a conversation. Redundant emails are those which were replied to and the reply contains their content already. Assuming the original mail does not contain attachments - it can be deleted. The use for such an ability is to conserve disk sp…
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Automate Deletion of Redundant Emails in Outlook 2007
Outlook 2007 lacks built-in functionality to automatically delete redundant emails in a conversation thread, which leads to clutter and increased disk space usage. Redundant emails are those that have been replied to, where the reply contains the original email's content and does not include attachments.
Awaiting Verification
Be the first to verify this fix
- 1
Create a VBA Macro
Open Outlook 2007 and access the VBA editor by pressing ALT + F11. In the editor, insert a new module and paste the following code to create a macro that identifies and deletes redundant emails.
vbaSub DeleteRedundantEmails() Dim objFolder As Outlook.Folder Dim objItem As Object Dim objMail As Outlook.MailItem Dim objReply As Outlook.MailItem Dim strBody As String Set objFolder = Application.ActiveExplorer.CurrentFolder For Each objItem In objFolder.Items If TypeOf objItem Is Outlook.MailItem Then Set objMail = objItem strBody = objMail.Body For Each objReply In objFolder.Items If TypeOf objReply Is Outlook.MailItem Then If InStr(1, objReply.Body, strBody) > 0 Then objMail.Delete Exit For End If End If Next objReply End If Next objItem End Sub - 2
Run the Macro
After creating the macro, close the VBA editor. Return to Outlook, press ALT + F8, select 'DeleteRedundantEmails', and click 'Run'. This will execute the macro and delete redundant emails in the currently selected folder.
- 3
Schedule the Macro (Optional)
To automate the process, you can schedule the macro to run at regular intervals using Windows Task Scheduler. Create a script that opens Outlook and runs the macro, then set the schedule as needed.
vbaSet objOutlook = CreateObject("Outlook.Application") objOutlook.Application.Run "DeleteRedundantEmails"
Validation
Check the selected folder in Outlook for the absence of redundant emails after running the macro. Verify that only the necessary emails remain and that no important emails were accidentally deleted.
Sign in to verify this fix