How do I change the default Junk Mail folder in Outlook?

I'm using an IMAP mail service (fastmail.fm) which moves Junk email messages to an IMAP folder called "Junk Mail". Outlook archives Junk to "Junk E-Mail".
How do I change Outlook so that it uses the "Junk Mail" folder for Junk instead of the default?


Solution 1:

It is much easier to Configure fastmail.fm to save probable spam in the Junk E-Mail folder Outlook creates than build a custom Outlook configuration.

  • Login to fastmail
  • Go to Options > Spam/Virus Protection
  • Click on Custom beside Spam Protection
  • Change the destination folder for Probable Spam from Junk Mail to Junk E-Mail and save. Custom Spam Protection Settings

Solution 2:

First, delete fastmail's "Junk Mail" folder if it currently exists. Then use the instructions below:


Install Collaboration Data Objects. (Note that it won't install directly - the file you downloaded just unpacks the real installer. Annoying.)

In Outlook, open the Visual Basic editor: either Alt+F11, or Tools - Macro - Visual Basic Editor

In the VB window, go to Tools - References, and enable CDO 1.2.1 in the list.

On the tree in left side, open Project1 - Microsoft Office Outlook - ThisOutlookSession, and paste this script (original source) to the window that opens:

Sub CDORenameFolder()
    Dim outlookApp As Outlook.Application
    Dim cdoSession As MAPI.Session
    Dim folder As Outlook.MAPIFolder
    Dim cdoFolder As MAPI.folder
    Dim newName As String

    Set outlookApp = New Outlook.Application
    Set cdoSession = New MAPI.Session
    cdoSession.Logon ShowDialog:=False, NewSession:=False

    Set folder = outlookApp.Session.PickFolder()
    Set cdoFolder = cdoSession.GetFolder(folder.EntryID, folder.StoreID)

    newName = InputBox("Rename '" + cdoFolder.Name + "' to:", "Rename folder", cdoFolder.Name)
    If newName <> "" Then
        cdoFolder.Name = newName
        cdoFolder.Update
    End If

    cdoSession.Logoff
    Set cdoSession = Nothing
    Set outlookApp = Nothing
End Sub

Press F5 (or Run - Run Sub), and run the ThisOutlookSession.CDORenameFolder macro. A folder selection window should pop up. Under your IMAP account, choose the "Junk E-mail" folder (the one created by Outlook) and click OK.

(If you get "User-defined type not defined", then you forgot to install and/or activate CDO.)


Yes, that is exactly why I hate Outlook now.