Now I lost entire data from it which was very important to my project seminar. Unfortunately I skipped save your changes dialog and closed the Word file without saving it. At the same time another task popped and made me to close the document to attend it. StrPath = Environ("USERPROFILE") & "\Desktop\blah. While editing my Word 2016 document, I made raft of changes to it. Set WordDoc = CreateObject("Word.Document") Set WordApp = CreateObject("Word.Application") If you can think of some word that is most probably unique to the document, you could also search (find hidden files) for any file containing that word. If it is an encrypted password, then this may be the best option without downloading a third party password breaker. WARNING** The brute force method is really not even worth it. Also it will now move from left to right, adding a new character with each pass, and prevents the popups when trying to open the document. I adjusted your original code, so it's not dependent on the password being a certain length. Set objDoc = (Filename:=strPath & "High Yield FMA Procedures.doc", PasswordTemplate:=passAtmp) Set objWord = CreateObject("word.Application")ĭim i As Integer, j As Integer, k As Integerĭim l As Integer, m As Integer, n As Integerĭim i1 As Integer, i2 As Integer, i3 As Integerĭim i4 As Integer, i5 As Integer, i6 As Integerįor i = 65 To 66: For j = 65 To 66: For k = 65 To 66įor l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66įor i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66įor i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 'Author unknown but submitted by brettdj of Dim objWord As Word.Application The only issue is when I use Documents.Open if the password is wrong word shows the dialogue box - is there anyway to get round this? Private Sub PasswordBreakerWord()
![i forgot to save my word document i forgot to save my word document](https://www.acronis.com/sites/default/files/inline_images/recover-unsaved-documents-min.png)
I forgot to save my word document code#
I found some code to break a password using brute force which is below (written it from with Excel). I have a word document that prompts the user for a password to open it, the dialogue box is like below.