Results 1 to 8 of 8
  1. #1
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,853
    Thanks
    4
    Thanked 259 Times in 239 Posts

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

    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.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  2. #2
    3 Star Lounger
    Join Date
    Nov 2002
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    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?

  3. #3
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,853
    Thanks
    4
    Thanked 259 Times in 239 Posts

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

    I can't solve how to disable it directly and the closest I can come to a solution is shown below.
    <pre>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</pre>

    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.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  4. #4
    3 Star Lounger
    Join Date
    Nov 2002
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    <P ID="edit" class=small>(Edited by jscher2000 on 27-Feb-03 20:23. Attachment changed for easier viewing.)</P>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?
    Attached Images Attached Images

  5. #5
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

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

    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

  6. #6
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

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

    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.

  7. #7
    3 Star Lounger
    Join Date
    Nov 2002
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    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?

  8. #8
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

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

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •