This KM Macro provides a way to go to the top level Inbox (of all accounts), and the top email message.
The common AppleScript to go to Inbox, goes to the inbox of the default account. If your Outlook 2011 Mac has multiple accounts, this macro is needed to go to the top level Inbox that includes ALL accounts.
Great work, man. A small improvement to wrap this all up in a single (slightly unweildy) AppleScript:
tell application "Microsoft Outlook" to get name of main window 1
set winName to result
tell application "System Events" to tell application process "Microsoft Outlook"
tell (first window whose name is winName) to set value of text field "search" of group 1 of toolbar 1 to ""
end tell
tell application "Microsoft Outlook"
set view of main window 1 to mail view
set selected folder to inbox
end tell
tell application "Microsoft Outlook" to get name of main window 1
set winName to result
tell application "System Events" to tell application process "Microsoft Outlook"
tell (first window whose name is winName)
select item 1 of row 1 of outline 1 of scroll area 1 of splitter group 1 of splitter group 1
end tell
try
click menu item "Clear All Filters" of menu 1 of menu item Filters of menu 1 of menu bar item "View" of menu bar 1
end try
end tell
Unfortunately, when I try your script, I get this error:
error "System Events got an error: Can’t set text field "search" of group 1 of toolbar 1 of window 1 of application process "Microsoft Outlook" whose name = "Searching Current Folder - All Accounts" to ""." number -10006
on this statement:
tell (first window whose name is winName) to set value of text field "search" of group 1 of toolbar 1 to ""
I don’t have 2011 handy. You could try commenting out that line and see
what happens. Should be a relatively small modification to get it where you
need it to be.