I know I can create rules, but rules do not work for shared email addresses, and I can't use the outlook UDF because data is stored on the exchange server, not locally.
I am able to get the handle, but not the control ID or text of any items. Here's what I have so far:
#include <GuiTreeView.au3> Opt("WinTitleMatchMode", 2) $OutlookTree = ControlGetHandle("Microsoft Outlook", "", "[CLASS:NetUIHWND;INSTANCE:1]") ConsoleWrite("Handle: " & $OutlookTree & @crlf) $item = GUICtrlRead($OutlookTree) ; Get the controlID of the current selected treeview ConsoleWrite("Item control ID: " & $item & @crlf) $text = GUICtrlRead($item, 1) ; Get the text of the treeview item ConsoleWrite("Item selected text: " & $text & @crlf) $text = _GUICtrlTreeView_GetItemParam($OutlookTree) ConsoleWrite("GetItemParam: " & $text & @crlf)
The output is:
Item control ID: 0
Item selected text: 0