Hi!
I am trying to disable the standard and formatting toolbar in my infopath form, but get the error "Permission denied" for this code in the OnLoad-function:
var objCommandBars = Application.ActiveWindow.CommandBars;
objCommandBars("Standard").Enabled = false;
objCommandBars("Formatting").Enabled = false;
Does anyone know what may cause this error?