I have an InfoPath form that I want to use the Submit feature on.
Therefore, I do not want the users to have the Save and Save As menu
items available. I found code to disable these items like this:
var objCommandBars = Application.ActiveWindow.CommandBars;
var myControls = objCommandBars.FindControls(1, 748);
for(var enumerator = new Enumerator(myControls); !enumerator.atEnd();
enumerator.moveNext())
{
enumerator.item().Enabled = false;
}
I put this code in the XDocument::OnLoad event. Unfortunately, this
does not seem to do anything.
Any ideas?
Thanks.
Andrew
darko - 27 May 2005 15:32 GMT
In the Menu - Tools->Form Options... -> Open and Save (tab)
uncheck the save and save as.. check box
> I have an InfoPath form that I want to use the Submit feature on.
> Therefore, I do not want the users to have the Save and Save As menu
[quoted text clipped - 15 lines]
> Thanks.
> Andrew
foomonkey - 27 May 2005 19:02 GMT
What do you know. That worked! Makes you wonder why long, technical
articles are written on how to do this with code.
Thanks!
Andrew