cancel
Showing results for 
Search instead for 
Did you mean: 

Get File Names for Open Word Documents

ChrisNewsom
Level 3
Hi

We have a process during which the application being used generates Word letters which we then print and send to our customers.

The application does not always close down the Word documents once they are printed correctly and also has retry functionality for printing the letters.

In order to try to mitigate this we are looking to terminate open Word documents based on their filename.

To do this we need to get a list of the filenames for all open Word documents, so we know which instances to close. Does anyone know a way to do this? The files are opened by the application outside of Blue Prism so we are not attached to the documents, nor do we have the handles for each instance.

Thanks,

------------------------------
Christopher Newsom
RPA Developer
Leeds Building Society
Europe/London
------------------------------
3 REPLIES 3

SutirthaGupta
Level 4
Hi,
If you know the filename then you can try to attach that particular word by using title of the word document. Once attached you can focus it and passing short-cut keys (ctrl+x), you can close down that particular word doc.
Regards
Sutirtha Gupta


------Original Message------

Hi

We have a process during which the application being used generates Word letters which we then print and send to our customers.

The application does not always close down the Word documents once they are printed correctly and also has retry functionality for printing the letters.

In order to try to mitigate this we are looking to terminate open Word documents based on their filename.

To do this we need to get a list of the filenames for all open Word documents, so we know which instances to close. Does anyone know a way to do this? The files are opened by the application outside of Blue Prism so we are not attached to the documents, nor do we have the handles for each instance.

Thanks,

------------------------------
Christopher Newsom
RPA Developer
Leeds Building Society
Europe/London
------------------------------

Hi Sutirtha,

Thanks for the reply. Unfortunately we do not know what the filename is going to be as the application allocates a randomly generated temporary filename.

Thanks

------------------------------
Christopher Newsom
RPA Developer
Leeds Building Society
Europe/London
------------------------------

Hi,
Another alternative which I can see here to identify the process Id. In the attach option you can provide that parameter too.
Before invoking and afyer invoking word you can check what are the process ids are running in word. 
But for that you need to write code stages to get those details.
Regards
Sutirtha Gupta
TCS, Kolkata


------Original Message------

Hi Sutirtha,

Thanks for the reply. Unfortunately we do not know what the filename is going to be as the application allocates a randomly generated temporary filename.

Thanks

------------------------------
Christopher Newsom
RPA Developer
Leeds Building Society
Europe/London
------------------------------