I have problems automating click “Home” → “Format” → “AutoFit Column Width” in Excel.
What I tried:
Click Button activities → Cannot select “AutoFit Column Width” as it is in a drop down menu
Type Into activity with “[d(alt)]hoi”+”[u(alt)]" → works as long as I watch the bot. But as soon as I minimize my server, Type Into activities do not work for me anymore
Send hotkey activity with “Alt + hoi”–> Only “h” and “o” are pressed, “i” for some reason does not work
Not sure what I am doing wrong. Please share your ideas!
Yes I am using an unattended bot. Tried both and tested attendedly first:
‘Send Window Message’ → Works partly: I can see that “h” and “o” are pressed, but I am not sure if “i” is also pressed, as the dropdown from the ribbon disappears in just a few milliseconds and the columns are still not adjusted. (Without “Send Window Message” it works fine attendedly). I think “Send Window Message” could be the way to go, but something is still wrong here
‘Simulate Type’ → Instant Error message “Cannot use UI_CONTROL_API on this UI node. Please use UI_HARDWAREEVENTS method”
Before run change this settings one time in excel.
In order for this activity to work, Trust Access to the VBA project object model must be enabled from Excel ( File > Options > Trust Center > Trust Center Settings > Macro Settings > Select the Trust Access to the VBA project object model check box).