Infopath 2003 – adding an attribute through code

posted in: Uncategorized | 0

BronwenWeeGo.jpgTo add an attribute by code in Infopath:

 

 
            IXMLDOMNode expressionBox= _document.DOM.selectSingleNode("//someNode");
            IXMLDOMNode disableEditing;
            node2 = _document.DOM.createAttribute("disableEditing");
            node2.text = "yes";
            addressNode.attributes.setNamedItem(node2);