Replace text in Word document : File being used by another process

I try to use replace text in Word application scope.
And, the throw the error stating

Replace Text: The process cannot access the file ‘xxxxx.docx’ because it is being used by another process.

May I know what is the issue?

@Alex8toh

Mostly because your file is still open, add kill process, in ProcessName “WINWORD” and see if it fixes your issue.

I am copy a template file and replace the content inside the new file.
When I run the RPA app, it will automatically open the document file.
Somehow, it causes the replace text to break.