Hello,
I insert a Custom Button into infopath module and I enable this Button only if all fileds of infopath module are not empty. I tried to do this work programmatically working with sampledata.xml to check fields value
IXMLDOMDocument2 oSampleData = (IXMLDOMDocument2)thisXDocument.CreateDOM();
oSampleData.async = false;
oSampleData.load("sampledata.xml");
oSampleData.setProperty("SelectionNamespaces", "xmlns:my=\"http://my\"");
IXMLDOMNode oSampleNode = oSampleData.selectSingleNode("/my:campiPersonali/my:campo1");
this.thisXDocument.UI.Alert(oSampleNode.text);
but I get this error :
Object reference not set to an instance of an object.
at InfoPathProject2.InfoPathProject2.stampaButton_OnClick(DocActionEvent e) in c:\......
at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)
What I can do ?
Thanks,Roberto