Keep sent items in the Additional Mailbox' Sent Items

Posted on 2008-11-12
Last Modified: 2012-05-05
I have an additonal mailbox attached to my outlook as does a number of people in my office but when we reply to or send an email from the additional mailbox the sent email is in the sent items of my account not the Additional Mailbox.

I know there is a reg setting to change the location of the deleted items but is there one for the sent items??
Question by:mitre-technical
    LVL 7

    Expert Comment

    You can have a look at this KB article from MS:

    Otherwise this tool may help:

    Although not free....
    LVL 76

    Expert Comment

    by:David Lee
    Hi, mitre-technical.  

    If you don't want to pay for a solution and don't mind using a script based solution, then I can provide a script that'll do this.

    Author Comment

    I dont really want to shell out any money so i would be interested in a script based solution
    LVL 76

    Accepted Solution

    Here's the code for doing this.  Follow these instructions to use it.

    1.  Start Outlook.
    2.  Click Tools->Macro->Visual Basic Editor.
    3.  If not already expanded, expand Modules and click on Module1.
    4.  Copy the code below and paste it into the right-hand pane of the VB Editor.
    5.  Edit the code as needed.  I placed comments where things must/should be edited.
    6.  Click the diskette icon on the toolbar to save the changes.
    7.  Close the VB Editor.
    8.  Click Tools->Macro->Security.
    9.  Change the Security Level setting to Medium.

    This works by monitoring the Sent Items folder.  When an item hits the folder the code fires.  It checks the item to see if it's a mail message.  If it is, then it checks the sender name.  If the name matches the one specified in code, then it moves the message to the folder of your choice, in this case the Sent Items folder of the other user's mailbox.
    Private WithEvents olkSentItems As Outlook.Items
    Private Sub Application_Quit()
        Set olkSentItems = Nothing
    End Sub
    Private Sub Application_Startup()
        Set olkSentItems = Session.GetDefaultFolder(olFolderSentMail).Items
    End Sub
    Private Sub olkSentItems_ItemAdd(ByVal Item As Object)
        Dim olkFolder As Outlook.MAPIFolder
        If Item.Class = olMail Then
            'Change the name on the following line as needed.  It will have to match the name in the message exactly.'
            If Item.SenderName ="SomeName" Then
                'Change the folder path on the following line to that of the folder you want the item moved to'
                Set olkFolder = OpenOutlookFolder("Mailbox - Doe, John\Sent Items")
                Item.Move olkFolder
            End If
        End If
        Set olkFolder = Nothing
    End Sub
    Function IsNothing(obj)
      If TypeName(obj) = "Nothing" Then
        IsNothing = True
        IsNothing = False
      End If
    End Function
    Function OpenOutlookFolder(strFolderPath As String) As Outlook.MAPIFolder
        Dim arrFolders As Variant, _
            varFolder As Variant, _
            olkFolder As Outlook.MAPIFolder
        On Error GoTo ehOpenOutlookFolder
        If strFolderPath = "" Then
            Set OpenOutlookFolder = Nothing
            If Left(strFolderPath, 1) = "\" Then
                strFolderPath = Right(strFolderPath, Len(strFolderPath) - 1)
            End If
            arrFolders = Split(strFolderPath, "\")
            For Each varFolder In arrFolders
                If IsNothing(olkFolder) Then
                    Set olkFolder = Session.Folders(varFolder)
                    Set olkFolder = olkFolder.Folders(varFolder)
                End If
            Set OpenOutlookFolder = olkFolder
        End If
        On Error GoTo 0
        Exit Function
        Set OpenOutlookFolder = Nothing
        On Error GoTo 0
    End Function

    Open in new window


    Expert Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Set OWA language and time zone in Exchange for individuals, all users or per database.
    Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
    To show how to generate a certificate request 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 Servers >> Certificates…
    The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

    737 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

    20 Experts available now in Live!

    Get 1:1 Help Now