mumdigau Posted May 22, 2008 Posted May 22, 2008 Hi, I'd like to move a toolbar of one of the Add-Ins I use in Outlook to an other position when Outlook starts. The script looks like this: ;#NoTrayIcon ;;; Opt("TrayIconDebug", 1) Opt("WinTitleMatchMode", 2) ;;; Dim Const $Outlook_Profile1 = "ExternalDrive_Network" Dim Const $Outlook_Prog = "F:\Programme\Microsoft Office\Office12\Outlook.exe" Dim Const $outlook_title = "Microsoft Office" ;;; Run($Outlook_Prog & " /Profile " & $Outlook_Profile1 & " /select Outlook:Posteingang","",@SW_MAXIMIZE) WinWait($outlook_title) WinWait("Posteingang") WinActivate("Posteingang") ControlFocus("Posteingang","","[CLASS:MsoCommandBar; TEXT:SpamBayes]") ControlMove("Posteingang","","[CLASS:MsoCommandBar; TEXT:SpamBayes]",585,50) ControlFocus seems to work, as the return value is 1. But ControlMove doesn't do what it should: The ControlBar stays where it is. The x- and y-coordinates I took from Au3Info after I manually moved the toolbar to the desired position. Can't I move toolbars by means of controls? Or do I have to use the mouse for that (what I do not like, because I'd like to avoid to interfere with user activities)? Best regards mumdigau
ResNullius Posted May 22, 2008 Posted May 22, 2008 MsoCommandBars aren't "typical" controls so they don't always respond to the standard "Controlxxxxx() functions. You could get messy with MouseClickDrag() functions, but really looks like you may need: Fritsche's "Active Accessibility For Ms Office UDF
mumdigau Posted May 22, 2008 Author Posted May 22, 2008 MsoCommandBars aren't "typical" controls so they don't always respond to the standard "Controlxxxxx() functions. You could get messy with MouseClickDrag() functions, but really looks like you may need: Fritsche's "Active Accessibility For Ms Office UDF Thanks for the info. I'll have a look to it. mumdigau
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now