Solved

Outlook Auto Archive to Exchange folder

Posted on 2010-08-26
6
676 Views
Last Modified: 2012-05-10
Is there a way to Auto Archive in Outlook 2003/07/10 to another folder in the Mailbox instead of a PST file?  i.e. move all items older than a certain age out of the Inbox to another Exchange folder.  Perhaps it can be done through a rule?  I did not see (at least in 2003) a way to do it with rules, but perhaps I  missed something.  Thanks.
0
Comment
Question by:arms145
  • 2
  • 2
  • 2
6 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 33530277
Hi, arms145.

No, this is not possible with rules.  Rules only work when items are sent or received.  Why do you want to archive to another folder in the same mailbox?  The primary purpose of archiving is to get things out of the mailbox that are no longer needed.
0
 

Author Comment

by:arms145
ID: 33530335
No longer needed is subjective, just want to keep Inbox folder itself uncluttered for some high volume users while still keeping the messages online in the Mailbox.  This seems like a simple function, perhaps there is a solution out there.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 33530419
Bad choice of words on my part.  I didn't mean to suggest that the items are no longer needed in the sense of ready to be thrown away.  

Archiving is specifically meant to take items offline, get them out of the mailbox to conserve space and reduce clutter.  I'm not aware of any means of archiving to the existing mailbox since that defeats the purpose of archiving.  A person doesn't archive paper files to the same filing cabinet the files are already in.  That aside, the only solutions I know of are to manually archive the items (i.e. the users moves them to the archive folder) or to write a macro that handles this.  
0
Shouldn't all users have the same email signature?

You wouldn't let your users design their own business cards, would you? So, why do you let them design their own email signatures? Think of the damage they could be doing to your brand reputation! Choose the easy way to manage set up and add email signatures for all users.

 
LVL 37

Accepted Solution

by:
Neil Russell earned 500 total points
ID: 33530777
OK, heres a MANUAL solution of a Macro. This MOVES all inbox item older than 60 days into a SUB FOLDER of INBOX called "Archived Mail"
Based on code found here.....   http://blogs.msdn.com/b/robert_mcmurray/archive/2010/02/25/outlook-macros-part-1-moving-emails-into-personal-folders.aspx

Sub MoveOldEmails()



    ' Declare all variables.

    Dim objOutlook As Outlook.Application

    Dim objNamespace As Outlook.NameSpace

    Dim objSourceFolder As Outlook.MAPIFolder

    Dim objDestFolder As Outlook.MAPIFolder

    Dim objVariant As Variant

    Dim lngMovedMailItems As Long

    Dim intCount As Integer

    Dim intDateDiff As Integer

    Dim strDestFolder As String

    

    ' Create an object for the Outlook application.

    Set objOutlook = Application

    ' Retrieve an object for the MAPI namespace.

    Set objNamespace = objOutlook.GetNamespace("MAPI")

    ' Retrieve a folder object for the source folder.

    Set objSourceFolder = objNamespace.GetDefaultFolder(olFolderInbox)

    

    ' Loop through the items in the folder. NOTE: This has to

    ' be done backwards; if you process forwards you have to

    ' re-run the macro an inverse exponential number of times.

    For intCount = objSourceFolder.Items.Count To 1 Step -1

        ' Retrieve an object from the folder.

        Set objVariant = objSourceFolder.Items.Item(intCount)

        ' Allow the system to process. (Helps you to cancel the

        ' macro, or continue to use Outlook in the background.)

        DoEvents

        ' Filter objects for emails or meeting requests.

        If objVariant.Class = olMail Or objVariant.Class = olMeetingRequest Then

            ' This is optional, but it helps me to see in the

            ' debug window where the macro is currently at.

            Debug.Print objVariant.SentOn

            ' Calculate the difference in years between

            ' this year and the year of the mail object.

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

            ' Only process the object if it isn't this year.

            If intDateDiff > 60 Then ' <<<<<<< THE NUMBER OF DAYS

                ' Calculate the name of the personal folder.

                strDestFolder = "Archived Mail"

                ' Retrieve a folder object for the destination folder.

                Set objDestFolder = objNamespace.GetDefaultFolder(olFolderInbox).Folders(strDestFolder)

                ' Move the object to the destination folder.

                objVariant.Move objDestFolder

                ' Just for curiousity, I like to see the number

                ' of items that were moved when the macro completes.

                lngMovedMailItems = lngMovedMailItems + 1

                ' Destroy the destination folder object.

                Set objDestFolder = Nothing

            End If

        End If

    Next

    

    ' Display the number of items that were moved.

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



End Sub

Open in new window

0
 
LVL 37

Expert Comment

by:Neil Russell
ID: 33541752
You could of course set this macro to fire everytime they open / close outlook and would to all intents and purpose then be automatic.
0
 

Author Closing Comment

by:arms145
ID: 33580301
Thanks for the script.  If no one knows any other way using a built-in feature, then I'll assume this is the best approach.  Outlook 2007 does have a new type of rule to move items older than a specific date, but oddly you can't specify older than a certain number of days, only a specific date, and they didn't improve on it in v2010.
0

Featured Post

Do email signature updates give you a headache?

Do you feel like you are constantly making changes to email signatures? Are the images not formatting how you want them to? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today.

Join & Write a Comment

Suggested Solutions

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
This video discusses moving either the default database or any database to a new volume.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now