How to Select Printer Dynamically in Excel Print Option

Hi All!

I have an automation problem wherein I can not get the element for the Printer Options in Excel upon opening the Print panel.

I am required to be able to switch from printers PRA-00748 and PRA-00294.

But I get the Could Not GetAncestryInfo error.

Kindly please advise how to tackle this.

Thank you!

Hi @michael.db.1990

Have you tried with select items activity

Regards
Sudharsan

Hi @michael.db.1990 ,

If the order of your printers does not change, you can use send hotkeys activity and use the keyboard keys to select the required printer.

thanks for the reply! Select Item doesn’t seem to work though :frowning:

Thanks for the reply. But then, how would i be abloe to make sure it selecting the correct printer? :frowning:

If the order of printer always remain same:

For example you are able to select printer PRA-00748 after pressing ‘Down’ key 7 times…then it is obvious that the bot will always select that printer, for more satisfaction you can put delay before/after in the send hotkey activity.

Thanks for the reply! Hmm, That would work if it always starts from the top. But after selecting a printer, it starts from the Current one. The thing is that, it should be able to switch between printers. But with the fact that we can’t get the element details of the current printer, we can’t confirm what the current printer is. :frowning:

@michael.db.1990 Apart from this, please give a try to this method…

while trying to indicate the printer, press F4 or Fn+F4, it will change the UI Framework, sometimes changing the UI Frameworks also resolves this kind of issues.

There are multiple UI Frameworks available, Default is by default.

image

Please try it & let me know if it works.

Hi! Still doesn’t work for me. It might get an element, but no Info or attribute to differentiate from others :frowning: