Remove password from Word Document

Does anyone know a way to remove a password from a .doc or .docx file without actually opening Word and navigating through the various menus/screens? I know there is 3rd party BalaReva package that does this but my organisation only allows UiPath created packages. I have the filepath and the password both stored as strings and can pass them out but not sure where to start. I did wonder if there was a way to do this with either command prompt or by invoking some C# or VB code. Thanks.

Hi @James_Grace ,

Since Set Text or Type Into activity doesn’t work under Word Application Scope, you can implement a workaround to tackle the situation.

  1. Start Process - You can provide the filePath that you have to open it up.
  2. Type Into - A password prompt appears & you can type the password into it.
  3. WordApplicationScope - Now you can proceed with the scope by passing the same filePath that you used.

Hope you find this helpful.
Cheers

Hi @arjunshenoy,

The problem I’ve got is once its entered the password it needs to the go and remove it. This requires a lot of clicks and logic to be built in. I’ve encountered various error messages such as ‘Safe Mode’ for word and it all just feels really clunky. As a result I would like a way to remove the password without opening the file.