<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Creating a new form from command-line</title><link>https://www.infopathdev.com:443/forums/thread/13163.aspx</link><pubDate>Wed, 09 Mar 2005 21:09:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13163</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13163.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13163</wfw:commentRss><description>Hi again,&lt;br /&gt;&lt;br /&gt;You can use a URN-based form to dispense with the need for a hardcoded href. Then it will work regardless of where you run it (so long as the InfoPath URN-based form is registered - use regform for that). &lt;br /&gt;&lt;br /&gt;Yes, I was saying that just use the command tool or whatever to create the XML that InfoPath loads, or you could create it and use Import. Either way, if there is a problem in the XML you will have problems loading the form, so this is a somewhat brittle approach. &lt;br /&gt;&lt;br /&gt;Yes, you will need the mso-application as well as the mso-infoPathSolution PIs.&lt;br /&gt;&lt;br /&gt;No need to call NewFromSolution. Just run the form.&lt;br /&gt;&lt;br /&gt;Hope this helps.</description></item><item><title>Re: Creating a new form from command-line</title><link>https://www.infopathdev.com:443/forums/thread/13162.aspx</link><pubDate>Wed, 09 Mar 2005 17:18:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13162</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13162.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13162</wfw:commentRss><description>Hi Patrick&lt;br /&gt;&lt;br /&gt;Thanks for that.&lt;br /&gt;So can you clarify if you mean that I should create an XML document  from the command line code? That is should I create the full structure of the Form (including all fields) within this XML? &lt;br /&gt;Are you suggesting I use a href to point the XSN template, in the PI, instead of the name attribute?&lt;br /&gt;&lt;br /&gt;Regarding processing instructions. I assume I will need to include all Processing instructions in the header i.e.:&lt;br /&gt;The application PI: &amp;lt;?mso-application progid="InfoPath.Document"?&amp;gt;&lt;br /&gt;The file attachment PI (since the forms will include attachemtns) &amp;lt;?mso-infoPath-file-attachment-present?&amp;gt;&lt;br /&gt;&lt;br /&gt;as well as the msolution PI:&lt;br /&gt;&amp;lt;?mso-infoPathSolution solutionVersion="1.0.0.282" productVersion="11.0.6357" PIVersion="1.0.0.0" ?&amp;gt;&lt;br /&gt;&lt;br /&gt;Finally I call the NewFromSolution method to launch the form. But do you mean that I call this from within my command line code? If so do I still use the XDocuments version of this method or the ExternalApplication version.&lt;br /&gt;&lt;br /&gt;thanks for you help&lt;br /&gt;Tadhg&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Creating a new form from command-line</title><link>https://www.infopathdev.com:443/forums/thread/13161.aspx</link><pubDate>Wed, 09 Mar 2005 08:05:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13161</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13161.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13161</wfw:commentRss><description>Hi Tadhg,&lt;br /&gt;Welcome to the board! Why not just create XML from your command line tool and add the InfoPath Processing Instruction (PI) to the form? Then, you can execute the form and it will load InfoPath and display it. NewFromSolution is detailed in the SDK. Do you have the SDK? If not, it is a total must have.&lt;br /&gt;Hope this helps!&lt;br /&gt;Patrick</description></item><item><title>Creating a new form from command-line</title><link>https://www.infopathdev.com:443/forums/thread/12429.aspx</link><pubDate>Thu, 03 Mar 2005 13:00:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12429</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12429.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12429</wfw:commentRss><description>This issue may be related to the IDE or to the fact that I am new to both c# and Infopath sdk. But I was wondering if you could help anyway.&lt;br /&gt;&lt;br /&gt;Basically we have a console based tool that will parse a Text file for values that we will use to populate the form.&lt;br /&gt;&lt;br /&gt;Also from within the Infopath project, currently we can populate the form and we can then just invoke infopath at the command-line.&lt;br /&gt;&lt;br /&gt;However I am looking for a way to invoke form creation directly from our command-line tool, e.g. by calling Newfromsolution. However it appears that I am only allowed to call this function from within an Infopath project class. I'm also not allowed to call NewFromSolution from within the "OnLoad" handler so where would I call it from?&lt;br /&gt;&lt;br /&gt;thanks in advance&lt;br /&gt;Tadhg&lt;br /&gt;</description></item></channel></rss>