harishreddy1701:I don't understand why I can not execute the following code in Infopath 2007 Visual Basic. I am using the following code on button click event. When I preview I get the alert "Infopath cannot open selected form" . Please help.
Dim myNavigator As XPathNavigator = MainDataSource.CreateNavigator()
MessageBox.Show(myNavigator.OuterXml.ToString(),"Main Data Source XML")
Thanks.
Harish
Hello, Harish,
your datasource XML file should be on network share (shared folder) with configured permissions for it. if it is on remote to Sharepoint Server 2010 machine. Also since it is external to Sharepoint source, the form needs Full Trust and administrator approval
I believe that default OOTB permissions on Windows Server (it is where Sharepoint Server always run) at operating system level prohibit accessing files
I would have uploaded the XML file to, for example, to Site Assets of server and used/accessed it from there
It is much simpler