Keep sent items in the Additional Mailbox' Sent Items

Posted on 2008-11-12
Medium Priority
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

Expert Comment

ID: 22938708
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
ID: 22938915
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

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

Accepted Solution

David Lee earned 2000 total points
ID: 22945162
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


Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
If you have come across a situation where you need to find some EDB mailbox recovery techniques, then here you will find the same. In this article, we will take you through three techniques using which you will be able to perform EDB recovery. You …
This video discusses moving either the default database or any database to a new volume.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses
Course of the Month16 days, 20 hours left to enroll

864 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