how to make a document password protected on closing

D

dr.k

Hello - I hope this is the right forum. I am not a programmer but think I need a programmer's help for this. I would like a Word form to be password protected upon closing. This is to allow a survey result to remain confidential until opened by the correct person. Security level doesn't need to be very high. Is there a macro that can do this? thanks.
 
J

Jean-Guy Marcil

Bonjour,

Dans son message, < dr.k > écrivait :
In this message, < dr.k > wrote:

|| Hello - I hope this is the right forum. I am not a programmer but think
I need a programmer's
|| help for this. I would like a Word form to be password protected upon
closing. This is to
|| allow a survey result to remain confidential until opened by the correct
person. Security level
|| doesn't need to be very high. Is there a macro that can do this?
thanks.

At its simplest expression, put this code in the ThisDocument module:

'_______________________________________
Private Sub Document_Close()

ActiveDocument.Password = "123"

End Sub
'_______________________________________

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
[email protected]
Word MVP site: http://www.word.mvps.org
 
Top