Bob I said:
I think you will need to use something like AutoIT to do this reasonably
quickly. It is free (donations accepted) at the authors website(google
AutoIt)
Maybe for Word (though I doubt it, but I'm not inclined to check), but
definitely not for Excel. Far more reliable to use a VBA macro in
Excel. The following macro assumes it's located in Personal.xls or
some other macro library file which should NOT be saved with a
password, all other open workbooks have already been saved before and
should be resaved/overwritten with file open passwords.
Sub foo()
Const PW As String = "common password here"
Dim k As Long
For k = 1 To Workbooks.Count
If Workbooks(k).FullName = ThisWorkbook.FullName Then GoTo
Continue
With Workbooks(k)
.SaveAs FileName:=.FullName, Password:=PW
End With
Continue:
Next k
End Sub
This could be modified to read a list of filenames in a cell range,
open those files, then resave with passwords. This would also likely
be faster AND more robust done in either Excel or Word and NOT using
generic 3rd party mouse and keyboard macro tools.