I’m not sure if this is the correct area to post this
question, but here goes.
I am working on an InfoPath form for which I have created an
install to place the .xsn on the end user’s local machine. At install the form
is made fully trusted (this is accomplished via the RegForm tool available in
the SDK). Once the user has run the install the form is apparently URN based
rather than URI. This is where my problem begins. The form contains budgeting
data that is written to an Excel spreadsheet (via Jscript) which is installed
to the same directory as the InfoPath .xsn file.
Now that the form is URN based the XDocument.Solution.URI
property no longer returns the directory path I need to provide in the script to
reference the location of the Excel file I need to write the data to.
So my question is: Can anyone point me in the right
direction to how I might go about acquiring the directory path to a form’s
template (in JScript) such as C:\MyDirectory\MyInfoPathForm.xsn when the form
is URN based? Or, perhaps how I might be able to go about providing the user the
ability to browse for the file to provide the path like in HTML using the <input
type="file" /> tag. I could use something like that just to pass
the path to the script.
Keep in mind that I have to use a pre-existing .xls document,
that contains too many custom features to recreate via scripting, not generate
it from scratch (which would of course make life easier of course :P) .
As always ... have a day :|