cancel
Showing results for 
Search instead for 
Did you mean: 

How to solve this error at 'Active Application' action while closing Excel: System.ComponentModel.Win32Exception (0x80004005)

AtsukiMitsuyori
Level 3
Hi,   I'm getting below error while closing Excel file, when I'm starting the process from Control Room via schedule function. Could you please help me with the solution if you got any. ERROR: Internal : Failed To perform Step 1 In Navigate Stage 'Press' on page 'Close Workbook' - Exception during remote setforegroundwindow - System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)   at System.Diagnostics.Process.Start()   at BluePrism.ApplicationManager.Operations.WindowOperationsProvider.ForceForeground(IntPtr windowHandle) I have had this error on Navigate stage: at 'Active Application' action before 'Press' action.   The process is below, Open Excel and workbook. Maximize the window of workbook: Press the miximize button. Close Excel: Press the close button. I'm using the same action, 'Active Application' and 'Press', on "2. Maximize the window of workbook" and "3. Close Excel", but the error causes only on "3. Close Excel". The element is using Win32 mode when doing 'Active Application', and is using Accessibility mode when doing 'Press'.   【Additional Information】 There is a retry loop(five times), but the same error caused five times. I don't use a virtual desktop, an application such as RDP to connect/disconnect and a virutalized environment at all. The other objects are working well which use the same action above.   Best regards,
2 REPLIES 2

John__Carter
Staff
Staff
It sounds like you're modelling the Excel UI. You don't need to do this, use the Excel VBO that you used in your Foundation Training.

AtsukiMitsuyori
Level 3
John, Thank you for your reply. Of course I know using the Excel VBO is the best way, but I need to model the Excel UI due to the below reason.   When I use Macro, the pop-up appears and I need to press the button on pop-up. You know I can't press the button by the Excel VBO. Certainly we can forbid Excel showing the pop-up by Setting, but I can't do that because the security level in our office is high. So I need to model the Excel UI.