09-20-2019, 07:18 PM
Its very hard to attach a toolbar to that particular part of word but this is working for me on microsoft office 2106 word on windows 10
function starts when word window is created and active
Function WordSaveAsToolbarLauncher
Trigger !ca"- Word" "OpusApp"
function starts when word window is created and active
Function WordSaveAsToolbarLauncher
Trigger !ca"- Word" "OpusApp"

int hwnd=TriggerWindow
;top
rep
,0.2
,Acc a.Find(hwnd "STATICTEXT" "Save As" "class=NetUIHWND" 0x5 0.3)
,err
,,if !IsWindow(hwnd)
,,,ret
,if(a.Hwnd)
,,err
,,,continue
,,break
,if !IsWindow(hwnd)
,,ret
int cwh= a.Hwnd
int tb=mac("Toolbar1" cwh) ;;edit this(Toolbar1) to match your toolbar name. Opens the toolbar and attaches it to the trigger window of this function.
int visible=1
rep
,if(!IsWindow(tb))
,,if(IsWindow(hwnd))
,,,goto top
,,else
,,,ret
,int c=cwh
,if visible!=(c!=0)
,,visible=c!=0
,,if(visible) hid- tb; else hid tb
,0.5