I am making an RDA solution (attended robot). The use case as following:
The robot fills a template in word with Word Application Scope and Set Bookmark Content.
This all works great. But a problem occurs when the user has an open word document. When the Word Application Scope is finish, the robot closes all word documents. This is a major issue as the robot as mentioned is attended. Even worse, if one of said word documents are unsaved, the robot freezes as the robot can’t close the document.
Thank you for the welcome! I have been here for years though but I simple got a new email address and therefore had to create a new user.
Yes, I have checked out that thread, but I am not sure this solves my problem. It might also be that I don’t fully understand the solution in the beforementioned thread.
I am unable to use the attach window-activity as I am using the Set Bookmark Content-activity, which can only live within a Word Application Scope.
But Word Application Scope has zero properties that can be used, such as an output window. And as soon as the Word Application Scope is finished all occurences of Word is closed - also any Word windows that might be open before the robot was executed.
I really appreciate your answer. Turns out I really did not understand the Attach Window-solution.
I does - however - not solve my problem. The underlying problem - that the Word Application Scope closes word documents that are already open.
Assume the user has a document open already - document A.
The user then run the robot. The robot performs an word application scope activity which opens another document - document B. When the word application scope is finished, the robot closes both document A and B.
I tried running your sample and the same happens. I wanted to share this, but as a new user I am unable to upload document.
I have used your code as a template. When the word application scope is finished executing one or more of the initial word documents will be closed with the Test File.docx
I’ll send your comment to our team so that they have a look. I checked it myself on and it indeed tries to close all files (the freeze on an unsaved file happens because word asks you to save the file).