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?
 
G

Guest

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

Guest

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top