unprotect document macro

  • Thread starter Thread starter jjuan
  • Start date Start date
J

jjuan

I forgot the password of my word document, so i cannot unprotect to edit it.
Anybody have a macro that Unproctect Document?
 
Hello jjuan,

Try:

Sub Test()
If ActiveDocument.ProtectionType <> wdNoProtection Then
ActiveDocument.Unprotect
End If
End Sub

Hope it helps,
 
If it is only Protected, then open a blank document and use Insert, File.
That will open the protected document into the new blank without protection.
 
hi, I've tryed your code on OTD file protected, but It can't access to the
storage macro. Have you any solution for open an OTD protected file?

thank u!
 
Back
Top