4

I would like to switch between seeing All and just Unread emails in my Outlook 2013 inbox using just the keyboard and a single key combo, for instance Ctrl+Shift+A and Ctrl+Shift+U (just an example).

Is there such a shortcut, or is it possible to create one?

The closest I have gotten is Ctrl+E to go to the search box, then Shift+Tab to jump to Unread and Shift-Tab again to get to All, then Space to select. Cumbersome!

1

You could map a few simple Macros in AutoHotkey with something like this:

#SingleInstance
#Persistent
SetTitleMatchMode 2

Hotkey, IfWinActive, Outlook ahk_class rctrl_renwnd32, NUIDocumentWindow
Hotkey, +u, ViewUnreadLabel
Hotkey, +a, ViewReadLabel
Hotkey, IfWinActive

SafeToRunMacro() {
    IfWinActive, ahk_class rctrl_renwnd32
    {
        ControlGetFocus, CurrentCtrl
        CtrlList = Acrobat Preview Window1,AfxWndW5,AfxWndW6,EXCEL71,MsoCommandBar1,OlkPicturePreviewer1,paneClassDC1,RichEdit20WPT2,RichEdit20WPT4,RichEdit20WPT5,RICHEDIT50W1,SUPERGRID1,SUPERGRID2,AfxWndW16,OutlookGrid1,NetUIHWND4
        if CurrentCtrl in %CtrlList%
        {
            Return, True
        } else {
            Return, False
        }
    }
}

ViewUnreadFunc(NormalKey) {
    if SafeToRunMacro() {
        ControlClick, OutlookGrid1, ahk_class rctrl_renwnd32,,,, NA x60 y5
    } else {
        Send %NormalKey%
    }
}

ViewReadFunc(NormalKey) {
    if SafeToRunMacro() {
        ControlClick, OutlookGrid1, ahk_class rctrl_renwnd32,,,, NA x5 y5
    } else {
        Send %NormalKey%
    }
}

ViewUnreadLabel:
    ViewUnreadFunc(A_ThisHotkey)
Return

ViewReadLabel:
    ViewReadFunc(A_ThisHotkey)
Return

If you're interested you can compile this into a .exe file and start it each time you start your PC. I'm working currently on implementing this into my Outlook GTD tool. If you're interested you can learn more at AutoGTD.com

1
  • 1
    Should've been some builtin shortcut, but thanks for this tip, for some reason didn't occur to me!
    – Are
    Aug 14 '15 at 11:46
2

So I wound up using a combination of the above tips, thanks everyone!

  • Created a custom view for only unread messages
  • Created a macro to switch between ordinary compact view and only unread messages view
  • Created a Quick Access Toolbar button for the macro, which can be used via Alt+the number corresponding to the buttons placement on the QAT.

This is the macro:

Sub SkifteView()

Dim ns As Outlook.NameSpace
Set ns = Application.GetNamespace("MAPI")

Dim Exp As Outlook.Explorer
Set Exp = Application.ActiveExplorer

Dim myInbox As Folder
Set myInbox = ns.GetDefaultFolder(olFolderInbox)

Set Exp.CurrentFolder = myInbox

If Application.ActiveExplorer.CurrentView.Name = "Compact" Then
   Application.ActiveExplorer.CurrentView = "Only unread"
Else
    Application.ActiveExplorer.CurrentView = "Compact"
End If
End Sub
0

The only thing that comes to my mind is to open two Outlook main windows: one for Inbox and another for Unread Mail search folder (you can right-click it and select Open in New Window).

After that you'll be able to switch between windows using ALT+TAB.

0

I created a new view (copy of Compact) and set it to only show unread. Then added the Change View command to the Quick Action Toolbar which I use a lot. It still requires 2 clicks, but it's an easy solution and pretty quick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.