top of page

Filtering emails by different authors is key part of the processing stage of electronic discovery. Outlook expert Diane Poremsky has posted a very helpful macro to slipstick.com which will automatically move all of the emails you select in Outlook into different subfolders - one subfolder for each sender.

This can save you some time and avoid doing some sorting, copying, and new folder creation. In Outlook 2016 just go to the Developer tab . . . Visual Basic, and then right click on 'ThisOutlookSession' in the Project section and insert a new module. Save and close. Select the emails you need to process and then go back to the Developer tab and select the macro. New folders for each sender will be automatically created.

Public Sub MoveSelectedMessages()

Dim objOutlook As Outlook.Application

Dim objNamespace As Outlook.NameSpace

Dim objDestFolder As Outlook.MAPIFolder

Dim objSourceFolder As Outlook.Folder

Dim currentExplorer As Explorer

Dim Selection As Selection

Dim obj As Object

Dim objVariant As Variant

Dim lngMovedItems As Long

Dim intCount As Integer

Dim intDateDiff As Integer

Dim strDestFolder As String

Set objOutlook = Application

Set objNamespace = objOutlook.GetNamespace("MAPI")

Set currentExplorer = objOutlook.ActiveExplorer

Set Selection = currentExplorer.Selection

Set objSourceFolder = currentExplorer.CurrentFolder

For Each obj In Selection

Set objVariant = obj

If objVariant.Class = olMail Then

intDateDiff = DateDiff("d", objVariant.SentOn, Now)

' I'm using 40 days, adjust as needed.

If intDateDiff > 40 Then

sSenderName = objVariant.SentOnBehalfOfName

If sSenderName = ";" Then

sSenderName = objVariant.SenderName

End If

On Error Resume Next

' Use These lines if the destination folder is not a subfolder of the current folder

' Dim objInbox As Outlook.MAPIFolder

' Set objInbox = objNamespace.Folders("alias@domain.com"). _

Folders("Inbox") ' or whereever the folder is

' Set objDestFolder = objInbox.Folders(sSenderName)

Set objDestFolder = objSourceFolder.Folders(sSenderName)

If objDestFolder Is Nothing Then

Set objDestFolder = objSourceFolder.Folders.Add(sSenderName)

End If

objVariant.Move objDestFolder

'count the # of items moved

lngMovedItems = lngMovedItems + 1

Set objDestFolder = Nothing

End If

End If

Err.Clear

Next

' Display the number of items that were moved.

MsgBox "Moved " & lngMovedItems & " messages(s)."

Set currentExplorer = Nothing

Set obj = Nothing

Set Selection = Nothing

Set objOutlook = Nothing

Set objNamespace = Nothing

Set objSourceFolder = Nothing

End Sub


 
 

After the conclusion of a case, you may face a dilemma when called upon to delete copies of documents produced by an opposing party or a third party. Inevitably attorneys will have emailed around PDFs or native files of produced documents hundreds of times. You can search for attachments using the bates prefix of the productions you need to target for destruction (see the Tip of the Night for March 5, 2016) by entering:

attachments: "XYZ"

The search will bring up emails attaching documents produced by the XYZ company, but these messages may also contain a lot of other attachments you'd prefer to retain. What you want to do is to strip out all of the attachments to a folder on your hard drive, so you can sort them by the file name and then just delete confidential documents which must be discarded under a protective order. In order to accomplish this, download, and install Kopf's Outlook Attachment Remover add-in at, http://www.kopf.com.br/outlook/ .

It appears as shown in this screen grab on the Add-ins tab:

. . . select emails that come up in your search for a bates prefix, and then click on the add-in.

This window will appear. As you can see you have the option of replacing the attachments with either links, or text references in the emails. Outlook Attachment Remover also will rename additional versions of attachments with the same file name.

After the attachments have been removed, a .lnk link file will remain that will have an icon looking very much like the original attachment.


 
 

If you're looking for attachments in Outlook which contain a particular string in their file name such as a bates number prefix (e.g., the XYZ in XYZ0000000100), you can run a specialized search in the box above and to the right of the table listing email messages. [or just press CTRL + E] Enter the search in this format:

Attachments: "XYZ"

Such a search will pull up any attachments where the string "XYZ" appears in the file name - whether at the beginning, somewhere in the middle, or at the end.


 
 

Sean O'Shea has more than 20 years of experience in the litigation support field with major law firms in New York and San Francisco.   He is an ACEDS Certified eDiscovery Specialist and a Relativity Certified Administrator.

The views expressed in this blog are those of the owner and do not reflect the views or opinions of the owner’s employer.

If you have a question or comment about this blog, please make a submission using the form to the right. 

Your details were sent successfully!

© 2015 by Sean O'Shea . Proudly created with Wix.com

bottom of page