Forum Discussion

Thanh's avatar
Thanh
Occasional Contributor
9 years ago

Cannot locate the text of a combo box in Outlook

Hello all,    I am trying to write some test and I need to obtain the text in the "Location" field when creating a new meeting from Microsoft Outlook. However, when I use the object spy I cannot se...
  • Ravik's avatar
    9 years ago

    Hi Thanh 

     

    There is two Object one is ComboBox and second in ListBox (under that comboBox) and all text are in List box.

     

    Try below code, it may help you.

     

    NameMapping.Sys.Process("OUTLOOK").Window("rctrl_renwnd32", "abc ", 1).Window("AfxWndW", "", 1).Window("AfxWndW", "", 1).Window("#32770", "", 1).Window("REComboBox20W", "", 1).Click

     

    c = NameMapping.Sys.Process("OUTLOOK").Window("REListBox20W", "", 1).wItemList

     

    wItemList will return all the text in the form io LIST

     

    Apply - wItem, wItemCount, selectItme and so on method