<?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>SharePoint Integration</title><link>https://www.infopathdev.com:443/forums/46.aspx</link><description> For questions concerning issues in the integration of SharePoint and Microsoft InfoPath.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Publish InfoPath form by code || Modify Template URI by code</title><link>https://www.infopathdev.com:443/forums/thread/24791.aspx</link><pubDate>Thu, 29 Nov 2007 14:59:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24791</guid><dc:creator>amsyo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24791.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=24791</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I found the answer to the third question (3.Does anybody know how to modify the javascript that the new button on a Document Library calls ??)&lt;/p&gt;
&lt;p&gt;Although not the best idea to do it ... I can&amp;#39;t think of any other way,&lt;/p&gt;
&lt;p&gt;By using IE toolbar for developers one can see that on clicking the new buton on a regular document library the one of the following javascript functions are calles&amp;nbsp;CreateNewDocumentByProgID() / CreateNewDocumentWithRedirect().&lt;/p&gt;
&lt;p&gt;In 12/Templates/Layouts/1033 there is a file called Core.JS. This file contains the two functions&amp;nbsp;. All you need to do is to modify the functions behaviour to pass parameters if you want.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Andrei Gavrila&lt;/p&gt;
&lt;p&gt;PS. If anybody needs more help on this .. simply reply.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Publish InfoPath form by code || Modify Template URI by code</title><link>https://www.infopathdev.com:443/forums/thread/24508.aspx</link><pubDate>Fri, 16 Nov 2007 15:25:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24508</guid><dc:creator>amsyo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24508.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=24508</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I need to publish a 2003 Compatible Form on multiple form libraries, and then each form has to be submitted on the document library were it was created.&lt;/p&gt;
&lt;p&gt;Because the document libraries are more than 50 .. publishing manually does not seem the best choice, so I want to publish automatically.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;The 2 ways of publishing(by code/power shell script) that I found are:&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;upload the file in the DocLibray\Form\ folder of each SPDocumentLibrary object&amp;nbsp;and then modify the SPDocumentLibrary property DocumentTemplateURL to that file, but because that makes&amp;nbsp;a complete copy, the template URI is not updated and that kills the dynamic submit.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;2. to upload the file as content type and then add the content type in every document library, but that also kills the dynamic&amp;nbsp;submit, because&amp;nbsp;thisXDocument.Solution.URI returns the same url for all libraries.&lt;/p&gt;
&lt;p&gt;So now I try to implement altenative scenarios ... like sending parameters to the form. But I don&amp;#39;t know how to wire the new button on the docuement library to instantiate something like &amp;quot;/DocumentLibray/Forms/template.xsn?Save=DocumentLibrary&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;To summarize:&lt;/p&gt;
&lt;p&gt;1.Does anybody know how to publish an infopath form to a sharepoint library&amp;nbsp;by code??&lt;/p&gt;
&lt;p&gt;2.Does anybody know how to modify the template URI of an xsn (by modifying the publishUrl attribute in the myschema.xsd of the .xsn) ??&lt;/p&gt;
&lt;p&gt;3.Does anybody know how to modify the javascript that the new button on a Document Library calls ??&lt;/p&gt;
&lt;p&gt;An answer to any of these questions would solve my problem.&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Andrei Gavrila&lt;/p&gt;</description></item></channel></rss>