Office 2010 Interaction / Automation
What appears to be happening is that the ComboBox that you use to select your printer:
Sys.Process("WINWORD").Form("test.docx -").Window("FullpageUIHost").Window("NetUIHWND").Pane("Backstage view").Client(0).Pane("Print").Grouping("Print").Grouping(0).Client(0).ComboBox("Which Printer")
Is implemented differently than the actual list of items in the ComboBox. Below is what I get when I use the object browser on an individual combobox item:
Sys.Process("WINWORD").Window("Net UI Tool Window", "", 1).Panel("Which Printer").List("Which Printer").Client(0).ListItem("My Printer")
The problem is that for the life of me I cannot get ClickItem() on the combobox to actually change the selection, either by name or index. I have tried MSAA both in the new mode and in the legacy mode but to no avail. I have tried giving focus to the combobox, calling click() on it first to open it, etc... but nothing I do actually allows me to intelligently change the box. I am theorizing that I could probably open it and then walk each item looking for the string I want to select, but this is a really kludge solution.
Can anyone shed some light on this dilema?
Thanks,
Jim
.Process("WINWORD").Form("test.docx -").Window("FullpageUIHost").Window("NetUIHWND").Pane("Backstage view").Client(0).Pane("Print").Grouping("Print").Grouping(0).Client(0).ComboBox("Which Printer")Is implemented differently than the actual list of items in the ComboBox. Below is what I get when I use the object browser on an individual combobox item:.Process("WINWORD").Window("Net UI Tool Window", "", 1).Panel("Which Printer").List("Which Printer").Client(0).ListItem("My Printer")The problem is that for the life of me I cannot get ClickItem() on the combobox to actually change the selection, either by name or index. I have tried MSAA both in the new mode and in the legacy mode but to no avail. I have tried giving focus to the combobox, calling click() on it first to open it, etc... but nothing I do actually allows me to intelligently change the box. I am theorizing that I could probably open it and then walk each item looking for the string I want to select, but this is a really kludge solution.Can anyone shed some light on this dilema?Thanks,Jim