Disable Menu Bar Control "Save" - InfoPath Dev
in

InfoPath Dev

Disable Menu Bar Control "Save"

Last post 01-04-2007 09:22 AM by Matt Faus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-04-2007 01:40 AM

    • zaphi
    • Top 150 Contributor
    • Joined on 01-09-2006
    • Switzerland
    • Posts 82

    Disable Menu Bar Control "Save"

    Hi,

    I have some problems with disabling of menu bar control "Save"

    I have written the following code:
    var objCommandBars = Application.ActiveWindow.CommandBars;
    objCommandBars.FindControl(1,3).Enabled = false;

    The Save Button in the Standard toolbar is disabled -> good
    Tha Save Control in the Menu File is not disabled -> not good

    The other problem is, that the Save button is also disabled in design mode.

    Does anybody have any suggestion. I don't want to use the check-box "Save and SaveAs" in the form options, because I get a problem by closing the form (no warning to save the changes). See also my other topic:http://infopathdev.com/forums/topic.asp?TOPIC_ID=4048

    Thanks.
    Philippe

    Infopath 2007/SP2
  • 01-04-2007 09:22 AM In reply to

    Re: Disable Menu Bar Control "Save"

    Hi Philippe,

    If you are going to use the CommandBars object instead of the function in the Form Options dialog, then you will need to disable each one of the Save buttons individually. CommandBars disables a specific button, not a functionality (such as save), so you will have to have a line for every one of the save buttons that you wish to disable.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.