<?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>Browser Forms</title><link>https://www.infopathdev.com:443/forums/40.aspx</link><description>For browser form specific questions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: How to create a print button in C# or VB?</title><link>https://www.infopathdev.com:443/forums/thread/24758.aspx</link><pubDate>Wed, 28 Nov 2007 18:02:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24758</guid><dc:creator>Zekebark</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24758.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=24758</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Patrick, thanks for the response! I&amp;#39;ll have to look into getting a copy of the book :)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Unfortunately, my requirements dictate that I must use Infopath 2007. It&amp;#39;s probably over my head, but I&amp;#39;ll try to investigate the IP 07 Object model and see if&amp;nbsp; I can get it to work using this as a start. I&amp;#39;ll post my results here if I have any luck. &lt;/p&gt;&lt;p&gt;&amp;nbsp;thanks!&lt;/p&gt;&lt;p&gt;-Z&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to create a print button in C# or VB?</title><link>https://www.infopathdev.com:443/forums/thread/24742.aspx</link><pubDate>Wed, 28 Nov 2007 06:27:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24742</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24742.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=24742</wfw:commentRss><description>&lt;p&gt;Hi Zekebark and welcome to our forum!&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s an excerpt from Chapter 2 of my book. Note: this does not use the InfoPath 2007 object model.&lt;/p&gt;
&lt;p&gt;Imports System&lt;br /&gt;Imports Microsoft.Office.Interop.InfoPath.SemiTrust&lt;br /&gt;Imports Microsoft.VisualBasic&lt;/p&gt;
&lt;p&gt;&amp;#39; Office integration attribute. Identifies the startup class for the form. Do not&lt;br /&gt;&amp;#39; modify.&lt;br /&gt;&amp;lt;Assembly: System.ComponentModel.DescriptionAttribute(&amp;quot;InfoPathStartupClass, Version=1.0, Class=Hello_World.Hello_World &amp;quot;)&amp;gt;&lt;/p&gt;
&lt;p&gt;Namespace Hello_World &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; The namespace prefixes defined in this attribute must remain synchronized with&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; those in the form definition file (.xsf).&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;InfoPathNamespace(&amp;quot;xmlns:my=&amp;#39;http://schemas.microsoft.com/office/infopath/2003/myXSD/2004-02-07T05-55-01&amp;#39;&amp;quot;)&amp;gt; _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Class Hello_World &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private thisXDocument As XDocument&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private thisApplication As Application&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub _Startup (app As Application, doc As XDocument)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; thisXDocument = doc&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; thisApplication = app&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; You can add additional initialization code here.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub _Shutdown ()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Class&lt;/p&gt;
&lt;p&gt;End Namespace&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to create a print button in C# or VB?</title><link>https://www.infopathdev.com:443/forums/thread/24740.aspx</link><pubDate>Wed, 28 Nov 2007 02:56:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24740</guid><dc:creator>Zekebark</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24740.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=24740</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;This is using Infopath 2007 btw&lt;/p&gt;&lt;p&gt;&amp;nbsp;(also, probably should have posted this in the code forum...oops!)&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>How to create a print button in C# or VB?</title><link>https://www.infopathdev.com:443/forums/thread/24739.aspx</link><pubDate>Wed, 28 Nov 2007 02:46:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24739</guid><dc:creator>Zekebark</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24739.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=24739</wfw:commentRss><description>&lt;p&gt;Hi, first time poster, new to Infopath.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;I&amp;#39;m not really a programmer but I understand that it will take managed code (C# or VB) if I&amp;#39;d like to create a print button on a fully trusted browser based form. I decided to take a crack at this with VB (since I was able to achieve this with VBScript) using the code below:&lt;/p&gt;&lt;p&gt;Public Sub CTRL110_5_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; thisXDocument.PrintOut()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;br /&gt;&lt;br /&gt;&amp;nbsp;this results in an error stating that &amp;quot;thisXDocument&amp;quot; is not declared. Any C# or VB solution for this would make my week!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>