J
Jamie
I recently upgraded from Word 2002 to 2003 and the following macro does not
function as it did in the 2002 version.
My department creates templates for other units. We do not want the users
to be able to unlock the templates so we attached the following macros to the
forms.
Sub ProtectForm()
'
' ProtectForm Macro
' Toggles protection for the active document
'
Dim Msg, Style, Title, Response
Msg = "This form is protected, please contact SAS for revisions." 'Define
message.
Style = vbCritical 'Define buttons.
Title = "Warning" 'Define Message Box title.
Response = MsgBox(Msg, Style, Title)
End Sub
Sub ToolsProtectUnprotectDocument()
'
' ToolsProtectUnprotectDocument Macro
' Macro created 3/29/2006 by Jamie Shaw
'
Dim Msg, Style, Title, Response
Msg = "This form is protected, please contact SAS for revisions." 'Define
message.
Style = vbCritical 'Define buttons.
Title = "Warning" 'Define Message Box title.
Response = MsgBox(Msg, Style, Title)
End Sub
The ProtectForm macro functions as before, however the
ToolsProtectUnprotectDocument macro does not. Now when the user goes to
Tools, Unprotect Document a Protect Document window opens with the following
choices: 1. Formatting restrictions, 2. Editing restrictions, and 3. Start
enforcement.
I would like the ToolsProtectUnprotectDocument macro to function as it did
before; when the user goes to Tools, Unprotect Document the message box
appears stating This form is protected, please contact SAS for revisions.
Can this be accomplished and if so, how?
Thanks for your help.
function as it did in the 2002 version.
My department creates templates for other units. We do not want the users
to be able to unlock the templates so we attached the following macros to the
forms.
Sub ProtectForm()
'
' ProtectForm Macro
' Toggles protection for the active document
'
Dim Msg, Style, Title, Response
Msg = "This form is protected, please contact SAS for revisions." 'Define
message.
Style = vbCritical 'Define buttons.
Title = "Warning" 'Define Message Box title.
Response = MsgBox(Msg, Style, Title)
End Sub
Sub ToolsProtectUnprotectDocument()
'
' ToolsProtectUnprotectDocument Macro
' Macro created 3/29/2006 by Jamie Shaw
'
Dim Msg, Style, Title, Response
Msg = "This form is protected, please contact SAS for revisions." 'Define
message.
Style = vbCritical 'Define buttons.
Title = "Warning" 'Define Message Box title.
Response = MsgBox(Msg, Style, Title)
End Sub
The ProtectForm macro functions as before, however the
ToolsProtectUnprotectDocument macro does not. Now when the user goes to
Tools, Unprotect Document a Protect Document window opens with the following
choices: 1. Formatting restrictions, 2. Editing restrictions, and 3. Start
enforcement.
I would like the ToolsProtectUnprotectDocument macro to function as it did
before; when the user goes to Tools, Unprotect Document the message box
appears stating This form is protected, please contact SAS for revisions.
Can this be accomplished and if so, how?
Thanks for your help.