Jump to content
Sign in to follow this  
mumdigau

How to move a ControlBar in Outlook

Recommended Posts

mumdigau

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

Share this post


Link to post
Share on other sites
ResNullius

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

Share this post


Link to post
Share on other sites
mumdigau

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.