Hello DT,
There is no by default method to get instance of active document. So as to save already opened document(Which is not opened by Blue Prism), we need to get first reference of the active document, Once we had the reference of active document then we can able to extract the path and name of active document. Here to create a scenario I just opened a new document and did not saved (manually, file name is ""Document1"") and trying to save it from Blue Prism. In this case we'll get only the Document name as an output, if opened document saved on different path and tried then we can able to get the path and name both. Below is the code:
Please find the attachment for piece of code
Here,
DocumentName : Output of code stage; it will return the name of active document
DocumentPath : Output of code stage, it will return the path of saved location
Create a new action under MS Word VBO and paste the above code in code stage. Make sure you giving DocumentName and DocumentPath in Output tab of code stage.
I hope this will work for your scenario. 🙂