<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>dotnet thoughts &#187; Infopath</title>
	<atom:link href="http://www.dotnetthoughts.net/tag/infopath/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dotnetthoughts.net</link>
	<description>a dotnet developer&#039;s technical blog</description>
	<lastBuildDate>Wed, 08 Feb 2012 03:18:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Printing Infopath forms</title>
		<link>http://www.dotnetthoughts.net/2008/04/25/printing-infopath-forms/</link>
		<comments>http://www.dotnetthoughts.net/2008/04/25/printing-infopath-forms/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 07:37:57 +0000</pubDate>
		<dc:creator>Anuraj P</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Office Interoperability]]></category>
		<category><![CDATA[Infopath]]></category>
		<category><![CDATA[VB.Net]]></category>

		<guid isPermaLink="false">http://anuraj.wordpress.com/?p=75</guid>
		<description><![CDATA[While working in Infopath forms, there may some situations where you may need to Print the InfoPath form. But the problem of Infopath API is that we can&#8217;t specify the printer name for printing. Like this one The printout method &#8230; <a href="http://www.dotnetthoughts.net/2008/04/25/printing-infopath-forms/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While working in Infopath forms, there may some situations where you may need to Print the InfoPath form. But the problem of Infopath API is that we can&#8217;t specify the printer name for printing. Like this one</p>
<pre class="brush: vb; title: ; notranslate">
InfoApp.XDocuments(0).PrintOut()
</pre>
<p>The printout method doesn&#8217;t have any parameters like Printer name or port etc. As a workaround you can export the Infopath document as Word, and print the document using Word API, where you can specify the printer name. To export the Infopath as Word there is no direct method, but you can do export to &#8220;MHT&#8221;(MHTML Document), and change the extention to &#8220;.doc&#8221; and using Word.Application you can open it and Print.</p>
<pre class="brush: vb; title: ; notranslate">
'Creating the Infopath application
Dim InfoApp As New InfoPath.Application()
'Opening the Infopath document.
InfoApp.XDocuments.Open(&quot;C:\Sample\template.xml&quot;)
'Exporting the document as Word(MHT)
InfoApp.XDocuments(0).View.Export(&quot;C:\Sample\Samplex.doc&quot;, &quot;MHT&quot;)
</pre>
<p>Let me know if you find any other solutions <img src='http://www.dotnetthoughts.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="betterrelated"><p><strong>Related content:</strong></p>
<ol><li> <a href="http://www.dotnetthoughts.net/2008/05/17/xpath-query-in-infopath-forms/" title="Permanent link to XPath query in Infopath forms">XPath query in Infopath forms</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2007/09/20/calling-word-macros-from-net/" title="Permanent link to Calling word Macros from .Net">Calling word Macros from .Net</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2008/05/02/creating-cab-files-using-makecabexe/" title="Permanent link to Creating CAB files using MakeCab.exe">Creating CAB files using MakeCab.exe</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2009/10/09/covert-powerpoint-slides-to-images/" title="Permanent link to Covert PowerPoint Slides to Images">Covert PowerPoint Slides to Images</a>  </li>
</ol></div>]]></content:encoded>
			<wfw:commentRss>http://www.dotnetthoughts.net/2008/04/25/printing-infopath-forms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

