
#Outlook archive archive#
An example name for this folder can be “Outlook Archive Folder”. Click Browse… we suggest creating a folder in your network (U:) drive, and save your archive file there. NOTE: Once you select this date, any emails in this folder that you received prior to this date will get stored in the Archive.Ĥ. Choose a date from “Archive items older than:” drop down arrow. Choose Archive this folder and all subfolders:ģ. NOTE: If the folder you wish to archive has sub-folders, make sure to check “Archive this folder and all subfolders:” that enables you to archive both the folder and its sub-folders.ġ. In this box you can select which folders you wanted to archive. You should now see a small pop-up box appear on your screen titled “Archive”. Note: For older versions of Outlook, Clean Up Old Items… may just be called Arc hive. Procedures Setting up an Archive Folder:Ģ. Click the “File” tab located in the upper left corner of the Outlook screen.ģ. Click the “Tools” Icon, and then choose “Clean Up Old Items…” from the drop-down menu. If (x.Body.Contains("offensiveProgram.exe ERROR "))įyi the UseMailItem is an extension method.This article will assist you with archiving in Outlook. public void MoveSpecificEmailsToArchives() So now to list out all of my emails I want to go through and move tham appropriatly. I would imagine this is fairly standard so if you copy and paste it should work just fine. _baseFolder = works just like any other MAPIFolder so it's just a matter of getting said folder. private readonly OutlookApplication _outlook Those two thinsg I already had in my constructor. Second was to to set _mapi to the Outlook.GetNamespace("MAPI"). One was to set _basefolder as my default email address's Folder. It wasn't as hard as I had thought either so I'll share what i have just incase someone else has this problem. Problem is just checking one folder takes over 31 seconds. I'm going to try to change a few of the variables and see if it moves. I found that in the MAPI Namspace one of the subfolders is Archives. Var destination = _ įoreach (var mailItem in _())
#Outlook archive code#
Here is the code I have that does the moving public void MoveSurveyPrintComponentsNotFound() I use the same class to find messages (in another test) and move it to that subfolder which that test is using. Messages.AddRange(target.GetEmailMessages("UnexpectedErrors\\NotFindImage")) Using (var target = new EmailMessageProvider())

Here is my NUnit test case that looks at a folder and gives me specific information Ok to show that I do have some work in progress (based on negative feedback) here is the code I have in place right now (since yes I know I have a give me teh codez)

So if you have any code readily available that finds the archive folder that would be great. I'm a little bit multitasking since I'm at work so I can edit as I go.
#Outlook archive how to#
lol) but for the life of me I can't figure out how to get my archive folder. I'm currently faced with a folder that has bout 3500 messages all around 350kb and is taking FOREVER to move to my archive so I can send and receive emails again (since my inbox is currently at 1.5Gb out of 500Mb. I have a C# program (actually it's just a C# library that is being used by NUnit) that I wish to modify slightly which is based off of this article: How to Programmatically move items in outlook.
