How to Open password protected Word Document without software

By FoxLearn 6/8/2024 4:22:32 AM   114
Recovering your Word document lost password with VBA code.

If your password is no more than 3 characters, you can use the VBA code to remove your password.

First, Open a new Word Document, then press Alt + F11 to open the Microsoft Visual Basic for Applications.

Next, Click on Insert, select Module.

word module

Enter the VBA code as shown below, and then press F5.

Sub test()
Dim i As Long
i = 0
Dim FileName As String
Application.FileDialog(msoFileDialogOpen).Show
FileName = Application.FileDialog(msoFileDialogOpen).SelectedItems(1)
ScreenUpdating = False
Line2: On Error GoTo Line1
Documents.Open FileName, , True, , i & ""
MsgBox "Password is " & i
Application.ScreenUpdating = True
Exit Sub
Line1: i = i + 1
Resume Line2
ScreenUpdating = True
End Sub

Finally, Select the password protected Word Document, and then click on Open.

In a few minutes your password will be recovered. You will see a dialogue box with the password and use the password to unlock your document.

To remove Word Document password. In your Word application, click on File => Protect Document => Encrypt with Password.

clear ms word password

You can remove the password on the text box, then click on OK to remove the password protection from your Word document. Next time you can open Word Document without password.