importing xml data into an Infopath form

T

Tim Grantham

I want to enable a user filling out an Infopath form to be able to populate
the fields with data sourced from an Excel spreadsheet. I have this working
in prototype right now by saving the spreadsheet as an XML file and in the
Infopath template creating a data connection to the file. I then run a
script when the form opens that copies the data from the XML file into the
controls in the Infopath form. (The data in the XML file uses a very
different schema than the one in the Infopath form.)

But I want users to be able to select the source file for the data
connection. I thought I could use the ShowModalDialog method to see if I can
get the user to set the FileURL property of the data connection, but I got a
"Permission Denied" error message when I tried the example for the
ShowModalDialog Method that is in the InfoPath SDK documentation.

Can anyone point me in the right direction?

Thanks,
Tim.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top