Thanks for the advice, but I'm having a couple of problems which I hope are just because I'm not a C# developer and are therefore easy to fix! First, I get an error that in the expression xnDoc.SelectSingleNode("/my:myFields/my:field_name", this.NamespaceManager).Value();
namely "'Value' is a 'property' not a 'method'"
Second, if I try a test save with ...
this.SaveAs(@"C:\test");
Then I get a security event:
System.Security.SecurityException
Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at Microsoft.Office.InfoPath.Internal.XmlFormHost.CheckFileWritePermission(String fileLocation)
at Microsoft.Office.InfoPath.Internal.XmlFormHost.SaveAs(String fileUrl)
at Microsoft.Office.InfoPath.XmlFormHostItem.SaveAs(String fileUrl)
at DailyRoutineForm2.FormCode.CTRL55_5_Clicked(Object sender, ClickedEventArgs e)
at Microsoft.Office.InfoPath.Internal.ButtonEventHost.OnButtonClick(DocActionEvent pEvent)
I guess there a re some persmission that need to be changed - any suggestions? Thanks in advance