PDA

View Full Version : Check if Word doc is protected, help required please...



Tecnik
06-18-2008, 01:48 AM
Hi there,

I have quite a few Word docs to process so I've put together a macro to help.
It works fine until it hits a protected document.

Please can someone tell me how I check if the open document is protected?
There isn't a password specified, the files are protected for form filling.

Thank you.

Regards,

Nick

Nelviticus
06-18-2008, 03:25 AM
You can use ActiveDocument.ProtectionType, e.g. 'If ActiveDocument.ProtectionType = wdNoProtection Then'.

Tecnik
06-18-2008, 03:43 AM
Thanks for the reply and for the snippet.
Have implemented it and it does exactly what is says on the tin. :)

Thank you once again.

Regards,

Nick

fumei
06-18-2008, 09:55 AM
Tecnik, if you are good with this ,please mark the thread as Solved. Thanks.