How can I decrypt a Word document that I know the password to without opening it in a word processor?
This one decrypts password-protected DOCX documents and has no dependencies apart from Python crypto library https://github.com/nolze/ms-offcrypto-tool
This python tool (https://github.com/herumi/msoffice) demonstrates how to command-line-decrypt password-protected Word documents.
You can also use free Password Cracker Tools (e.g. https://www.lifewire.com/free-word-password-recovery-tools-2626185).
You can even use an online service for this (e.g. http://www.decryptum.com/ with free preview).
But in your case with malware infected documents I recommend a standalone PC with a sandbox to just open the document in word.