How to permit code to run behind documents with restricted permissions RRS feed

  • Question

  • Hey guys!

    Based on the title of my question, you'd say would be the 100% solution to my problem. However, it isn't.

    I'm using (Dutch version) of Word 2010. I've made a form for people to fill in. Because some fields are in the header (and I'm afraid people won't notice this), I've also made a UserField using VBA. It asks the user a couple of questions and then fills in the answers at the right place.

    Then people can continue filling in the rest of the document.

    Because I want to prevent people from making unauthorized changes, I tried to limit the editing to filling out forms. However, when I do this, the header can't be edited anymore. (no permission error, which is correct).

    The link I provided above seems to be the solution. However the function described might works fine for Word 2003/Word 2007, but not for Word 2010. It has been replaced by a newer function. However, it doesn't seem to offer the same flexibility when it comes to executing code. I don't see any advanced button and I don't see any exceptions, other than people (which come from the AD I guess).



    I am able to select the header and then choose "editing allowed by everyone". However, this means I have to select every single field I want to allow to be edited. This can't be the right solution I guess.

    I've been searching into this for a while but I can't figure it out.

    I also tried the method provided in but when I C&P the supplied code, it doesn't work (shows up in red, gives an exception error). I'm not sure I can use VB code at VBA, since the page is at the visual studio part of the website.

    Thanks in advance.

    As a work around I did the following:

    Basically I supply the document to my users unprotected and then let the VB code protect it. However, it’s not an ideal solution, nor would it be advisable if you wanted to pre-protect it using a password (which you don’t want to store as plain text).
    Tuesday, August 6, 2013 7:47 AM

All replies