Hello,
I'm hoping someone here can give me a definitive answer on what I'd call an experiment with the href attribute of the mso-infoPathSolution processing tag in XML generated from an InfoPath form template.
Typically, InfoPath embeds the location of the form used to generate the XML in this attribute. E.g., href="file:///C:\InfoPath\Forms\Form1.xsn". This is frustrating for my users who may not all want to store Form1.xsn at C:\Forms, but they also aren't too keen on the idea of having to run scripts or otherwise manually update the href attribute in the XML.
This lead me to wonder if it is possible to use a Windows environment variable in the href attribute. E.g., href="%FORM_PATH%\Form1.xsn" or href="file:///%FORM_PATH%\Form1.xsn". Unfortunately, neither of these approaches has worked for me.
In the first case, InfoPath reports an error when attempting to open the form: "Infopath cannot open the following file: C:\InfoPath\Form1.xml. To open the file, access to the following for template is required: file:///C:\InfoPath\%25FORM_LOC%25\Form1.xsn". In the second case, InfoPath simply reports "InfoPath cannot open the following file: C:\InfoPath\Form1.xml".
It seems as though the URL format that InfoPath expects (either something on a network location or a file URL) won't permit me to use an environment variable. InfoPath definitely doesn't seem to like the percent sign in the URL, either, as I get the same error in the first case whether I use %, %25 or %.
I'm thinking that this simply is not possible, but I wanted to ask here to be certain. I'm running InfoPath 2010, and my forms are stand-alone, classic forms (no VB code, no SharePoint integration, simply saved locally on a user's machine, neither installed nor otherwise signed with a certificate).
Thanks much in advance.