PDA

View Full Version : Is there a way to disable the "Restrict Editing" button ?



OGKro
05-24-2023, 02:20 AM
Hello everyone !

So my job is to create many different templates that can help my friends at work. I work for the support team. So if anyone needs help with a template or need a new template they come to me. The problem is we have a password we use for all the templates and we aren't able to change it due to some rules. Some people know the code and unprotect the document which messes up the macros. So, is there a way to disable the restrict editing button that makes the deprotection possible ?

Logit
05-24-2023, 12:51 PM
What control or menu selection are you referring to as 'restrict editing button' ?

gmayor
05-24-2023, 10:49 PM
I suppose you could reprotect the document with your macros and then password protect the VBA project, but I don't know of a way to disable the option. This is better addressed by training the staff, or changing the rule that prevents you from changing the password.

If ActiveDocument.ProtectionType = wdNoProtection Then
ActiveDocument.Protect Type:=wdAllowOnlyReading, NoReset:=True, Password:="Password"
End If

OGKro
05-26-2023, 01:23 AM
We've been doing that but you know some people always think they can go under the radar :/

Logit
05-26-2023, 09:16 AM
Ok ... you ask a question and for further understanding I responded with a question which you ignored. Remember that you came here for
assistance from volunteers. Impolite to ignore the volunteers.

Second question: Would it assist your effort to have a macro that records who is editing the document ?

OGKro
05-26-2023, 09:44 AM
As i said i am on this forum when im at work. So i don’t have all the time for it. You could’ve assumed maybe that i may have forgotten to answer and not that i didn’t skip your question on purpose. Whatever anyway.

There is only one button on the developer tab that is called Restreic editing.

Logit
05-26-2023, 11:07 AM
My version of Excel does not include the "Restrict Editing" selection.

Disregard my second question as it apparently has no value to your possible solution.

Aussiebear
05-26-2023, 01:18 PM
Actually Logit, you may well be on the right track here. Why can't we record who is opening the file, and who is altering the macros or formula, to another linked file?

Chas Kenyon
05-30-2023, 05:40 AM
***

There is only one button on the developer tab that is called Restrict editing.

The button also appears on the Review tab.

You could use XML to modify the Ribbon in your document templates to remove the buttons altogether. This will not keep a determined person from using the function, just make it harder. (P.S. you don't even need the password.)

Customize the Office Ribbon (It doesn't take rocket science) by Greg Maxey
(https://gregmaxey.com/word_tip_pages/customize_ribbon_main.html)

OGKro
05-31-2023, 01:58 AM
Thank you for that link. I'll give it a try and see if they find out or not !