• Disable an Options dialog box item (Word 2000 and XP)

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Disable an Options dialog box item (Word 2000 and XP)

    Author
    Topic
    #384029

    Yes it can be deleted but only if they know the password to get into the file in the first place.

    The problem with coming up with a macro solution to disable this field is what happens if the user disables macros on opening this file (a common security minimiser).

    By the way, a three character password will take almost no time to crack.

    Viewing 1 reply thread
    Author
    Replies
    • #657218

      Oh I know the three character password is not secure, it was from an example. Our application forces the user to enable macros or else they don’t see the document and all of the menu items are disabled, including the “Options…” menu item. So do you know how to disable the fields in the option box via Word’s object model?

      • #657267

        I can’t solve how to disable it directly and the closest I can come to a solution is shown below.

        Sub ToolsOptions()
          Dim sPwd As String
          With Dialogs(wdDialogToolsOptionsSave)
            '.DefaultTab = wdDialogToolsOptionsSave
            sPwd = .Password
            .Show
            If .Password  sPwd Then
              MsgBox "Sorry, you're not allowed to change that"
              .Password = sPwd
            End If
          End With
        End Sub

        The problems is this dialog that shows doesn’t have the other tabs. If you run with wdDialogToolsOptions instead then the .Password doesn’t work. I am sure the answer is there somewhere but I can’t figure it out at the moment.

        I still wouldn’t be all that sure of the protection that would result if we could get it working. For instance if the user disables macros for Word completely (including your protection add-ins), opens the file, removes the password and saves, closes and reopens with macros has that circumvented your protection. Disabling the Options dialog in your application will only slow them down if they are really determined.

        You would get about the same amount of protection by saving the file with a different file extension and then they wouldn’t ‘by default’ open the file with Word.

      • #657839

        Yet another option to look at is whether you can lock down this field via the application of an Office policy template – most elements in Options can be locked down this way.

        • #658208

          I am not familiar with “Office policy template” and haven’t found anything on it in help, can you explain and how to access it? Is it something taht can be accessed via code?

          • #658373

            Jim,

            This is a variant on system policies, designed to allow administrators to control the environment for users of Office.There are a number of papers on this on MS’s site but unfortunately I can’t find the relevant link right now; will post back with it shortly. In the meantime, there’s a brief page about it here.

            (A bit later…) I think this link may take you to a more detailed description: here

            Gary

    • #657149

      (Edited by jscher2000 on 27-Feb-03 20:23. Attachment changed for easier viewing.)

      See the attachment to view a screen shot and comments as to what I wish to do. I am using Word XP and encrypting some word docs and we only what to be able to view the contents of these word docs using the password via another program. I have discovered that an encrypted word doc can still be viewed if one just goes to the security tab of Options and deletes the password so my question is how does one disable the field or tab area shown in the screen shot?

      • #657331

        An alternative approach might be to intercept the FileSave and FileSaveAs commands and set your required password there. You could also do this with a DocumentBeforeSave event.

        This would still let the user change the password in the options screen, but everytime the document is saved you could set the correct password.

        StuartR

    Viewing 1 reply thread
    Reply To: Disable an Options dialog box item (Word 2000 and XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: