stemcor Posted December 3, 2007 Posted December 3, 2007 Hi I'm trying to set which addressbook has to be shown first in Outlook 2007. When checking with "Au3info.exe" I don't really get if this is a Combo Box or ListBox and which ID it has to set this. And it just does not take over the settings I'm trying to make. I want to show the "ADDRESSBOOK" to "show this address list first". And then "keep personal addresses in: "Contacts". The Window is called Addressing. This is the code in Autoit: ;Set show address list first ControlCommand($Titles[$Addressing],"","[CLASS:REComboBox20W:651]","SetCurrentSelection","ADDRESSBOOK") ControlCommand($Titles[$Addressing],"","[CLASS:REComboBox20W:652]","SetCurrentSelection",$Contacts) CloseWindow($Titles[$Addressing]) WinClose($Titles[$ABStemcor],"") But it does not take effect, it just closes the window. I didnt see any examples of how to choose from a ComboBox or List Box. Do I have to make a ControlSend as well? If you need, I can send more details from the code. Thanks for your help.
jesaljhaveri Posted July 23, 2008 Posted July 23, 2008 Hi, I tried activate window with handle. ; Change into the WinTitleMatchMode that supports classnames and handles AutoItSetOption("WinTitleMatchMode", 4) ; Get the handle of a notepad window that contains "this one" $handle = WinGetHandle("classname=#32770", "") then tried to access the combo box with window title WinActivate ( "Choose Profile", "") ControlSetText("Choose Profile", "", "REComboBox20W1", "test") The above code worked for me. When i was trying to access the combo box using same window access method it was not working. - Jesal Hi I'm trying to set which addressbook has to be shown first in Outlook 2007. When checking with "Au3info.exe" I don't really get if this is a Combo Box or ListBox and which ID it has to set this. And it just does not take over the settings I'm trying to make. I want to show the "ADDRESSBOOK" to "show this address list first". And then "keep personal addresses in: "Contacts". The Window is called Addressing. This is the code in Autoit: ;Set show address list first ControlCommand($Titles[$Addressing],"","[CLASS:REComboBox20W:651]","SetCurrentSelection","ADDRESSBOOK") ControlCommand($Titles[$Addressing],"","[CLASS:REComboBox20W:652]","SetCurrentSelection",$Contacts) CloseWindow($Titles[$Addressing]) WinClose($Titles[$ABStemcor],"") But it does not take effect, it just closes the window. I didnt see any examples of how to choose from a ComboBox or List Box. Do I have to make a ControlSend as well? If you need, I can send more details from the code. Thanks for your help.
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