<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Convert form to TIF in background process</title><link>https://www.infopathdev.com:443/forums/thread/77017.aspx</link><pubDate>Thu, 29 Mar 2012 23:09:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77017</guid><dc:creator>tootuff305</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77017.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=77017</wfw:commentRss><description>&lt;p&gt;I found the answer.&amp;nbsp; Turns out that the system still had a cached template of the one from my dev environment.&amp;nbsp; Even though i tried the &amp;quot;infopath /cache clearall&amp;quot; while logged in as the account running the service it still kept pointing to the old template.&amp;nbsp; I ended up doing a search for the physical folder that did the trick.&amp;nbsp; Make sure to delete out the contents of the following folders:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;- C:\Documents and Settings\&lt;strong&gt;Default User&lt;/strong&gt;\Local Settings\Application Data\Microsoft\InfoPath\FormCache2&lt;/p&gt;
&lt;p&gt;- C:\Documents and Settings\&amp;lt;&amp;lt;serviceaccountuser&amp;gt;&amp;gt;\Local Settings\Application Data\Microsoft\InfoPath\FormCache2&lt;/p&gt;
&lt;p&gt;&amp;nbsp;This is what did it for me.&amp;nbsp; Now my service runs without opening up the form in the Foreground.&lt;/p&gt;</description></item><item><title>Re: Convert form to TIF in background process</title><link>https://www.infopathdev.com:443/forums/thread/76938.aspx</link><pubDate>Wed, 28 Mar 2012 17:36:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:76938</guid><dc:creator>tootuff305</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/76938.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=76938</wfw:commentRss><description>&lt;p&gt;So I found a way to make this run in a background process by turning the applicaiton into a Windows Service and using a Timer Job.&amp;nbsp; This worked fine in my development environment.&amp;nbsp; However, I am not getting the following error in Production when running the service.&lt;/p&gt;
&lt;p&gt;The selected file is an update of a form on your computer. However, the update has been blocked because the author of the file cannot be verified.&lt;/p&gt;
&lt;p&gt;I can login to the server using the credentials of the service account that&amp;#39;s running the service and it can definitely open up the files from the SharePoint Form library without any issues.&amp;nbsp; It&amp;#39;s almost as if the service account is using an entirely new user profile or none at all when connecting to SharePoint.&amp;nbsp; It appears to be an issue with Internet Explorer settings.&amp;nbsp; Does anyone have any suggestions?&lt;/p&gt;</description></item><item><title>Re: Convert form to TIF in background process</title><link>https://www.infopathdev.com:443/forums/thread/76671.aspx</link><pubDate>Wed, 21 Mar 2012 01:02:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:76671</guid><dc:creator>tootuff305</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/76671.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=76671</wfw:commentRss><description>&lt;p&gt;I was informed that I could possibly run the process in the background by opening the document in a different manner.&amp;nbsp; I attempted to follow another&amp;nbsp;post i saw to open up the document by swapping out the XDocument oDoc = oApp.XDocuments.Open(fileName,1) with the following code:&lt;/p&gt;
&lt;p&gt;XDocuments oDocs = oApp.XDocuments;&lt;br /&gt;Type oDocsType = oDocs.GetType();&lt;br /&gt;object objDocName = fileName;&lt;br /&gt;XDocument oDoc = (XDocument)oDocsType.InvokeMember(&amp;quot;Open&amp;quot;, System.Reflection.BindingFlags.InvokeMethod, null, oDocs, new Object[] { objDocName, null, null });&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Unfortunately, I don&amp;#39;t know what the expected parameters are for the InvokeMethod and am getting an exception error stating:&lt;/p&gt;
&lt;p&gt;Number of parameters specified does not match the expected number&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any suggestions?&lt;/p&gt;</description></item><item><title>Convert form to TIF in background process</title><link>https://www.infopathdev.com:443/forums/thread/76437.aspx</link><pubDate>Wed, 14 Mar 2012 16:41:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:76437</guid><dc:creator>tootuff305</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/76437.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=76437</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m trying to convert all of my completed InfoPath forms in a SharePoint repository to TIF format.&amp;nbsp; I&amp;#39;ve already created a console application that runs on a separate utility server to poll the List for certain criteria via SP Web services and am able to convert the file using the Microsoft Office Document Writer with the following code:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; ConvertFile(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; fileName)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;Microsoft.Office.Interop.InfoPath.&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;ApplicationClass&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; oApp = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;ApplicationClass&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;();&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;try&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XDocument&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; oDoc = oApp.XDocuments.Open(fileName, 1);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;oDoc.PrintOut();&lt;/p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Thread&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Sleep(5000);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;catch&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Exception&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; ex)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Utils&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.WriteToLog(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Format(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;@&amp;quot;DataAccess.cs - ConvertFile({0}). Exception: {1}&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, fileName, ex), &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Utils&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;ErrorTypes&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Error);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;throw&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; ex;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;finally&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;{&lt;/p&gt;oApp.Quit(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;true&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I already have the Document Writer configured using Registry settings to output to a designated folder from where I move it to the proper repository in our Records system.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;I&amp;#39;m kicking off the executeable via Scheduled Tasks on a set schedule which works fine provided someone is logged onto the system.&amp;nbsp; I have two issues:&lt;/p&gt;
&lt;p&gt;1. If someone logs onto another terminal session, they can affect or hold up the process because the InfoPath form opens up within their session.&amp;nbsp; How can we have this open up in a background process and still print out?&amp;nbsp; &lt;/p&gt;
&lt;p&gt;2. Run the code without requiring someone to be logged onto the session.&amp;nbsp; Even though I run the code with a userid that has rights, the code can grab a form but has issues opening up the template.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any ideas?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>