unprotect document macro

J

jjuan

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

Brian

Hello jjuan,

Try:

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

Hope it helps,
 
T

Terry Farrell

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.
 
D

dev

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!
 
Top