<?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: Can't find XMLForm in OM</title><link>https://www.infopathdev.com:443/forums/thread/21780.aspx</link><pubDate>Wed, 18 Jul 2007 17:06:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21780</guid><dc:creator>jlapegna</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21780.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=21780</wfw:commentRss><description>&lt;p&gt;Thanks David.&lt;/p&gt;&lt;p&gt;&amp;nbsp;My reason for having a print button was because i didn&amp;#39;t want to show the top (or bottom) forms services bar.&amp;nbsp; But I guess I will have to keep it and only display the print button.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks for the help.&lt;/p&gt;</description></item><item><title>Re: Can't find XMLForm in OM</title><link>https://www.infopathdev.com:443/forums/thread/21706.aspx</link><pubDate>Mon, 16 Jul 2007 19:15:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21706</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21706.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=21706</wfw:commentRss><description>&lt;p&gt;I would not think so - the code can only run on the server, no exceptions. If you hack around and get access to the printer, it will be one on your server which in most cases make no sense.&lt;/p&gt;&lt;p&gt;Note that there is a print button in the browser-enabled forms - this is not good enough for you? The only thing that does run in the browser is javascript. Theoretically you could host the infopath form in your own ASPX page and run some custom javascript in it that would enable print scenarios. However this is pretty complicated and might not yield the desired results so I would say the short answer would be &amp;quot;no&amp;quot;.&lt;/p&gt;&lt;p&gt;If you still want to explore the hosting approach, you can check out this post: &lt;a href="http://blogs.msdn.com/infopath/archive/2006/10/21/hosting-infopath-forms-in-a-custom-aspx-page.aspx"&gt;http://blogs.msdn.com/infopath/archive/2006/10/21/hosting-infopath-forms-in-a-custom-aspx-page.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Can't find XMLForm in OM</title><link>https://www.infopathdev.com:443/forums/thread/21701.aspx</link><pubDate>Mon, 16 Jul 2007 18:27:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21701</guid><dc:creator>jlapegna</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21701.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=21701</wfw:commentRss><description>&lt;p&gt;ah, I see.&amp;nbsp; I am running the form in a browser only, and not in the infopath client.&lt;/p&gt;&lt;p&gt;Is there any way to print a view from the browser with code?&lt;/p&gt;</description></item><item><title>Re: Can't find XMLForm in OM</title><link>https://www.infopathdev.com:443/forums/thread/21698.aspx</link><pubDate>Mon, 16 Jul 2007 17:45:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21698</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21698.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=21698</wfw:commentRss><description>&lt;p&gt;Random guess:&lt;/p&gt;&lt;p&gt;You are designing a form that is marked as Browser-compatible (i.e. it may run on the InfoPath Forms Server). When you are in this mode, several OM features are disabled since they make no sense on the server.&lt;/p&gt;&lt;p&gt;If you are designing the form that is only intended to run on the client, simple change the compatibility settings via the Design Checker. If you intend the form to run only on the server, you cannot use Print() because IPFS has no way of triggering printing in the browser. Finally, if you intend to have it working in both client and server and if you expect Print to work only when you&amp;#39;re running in the rich client, there are some hoops you could go through to get it to work. Hopefully this is not your case, though :)&lt;/p&gt;</description></item><item><title>Re: Can't find XMLForm in OM</title><link>https://www.infopathdev.com:443/forums/thread/21697.aspx</link><pubDate>Mon, 16 Jul 2007 17:24:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21697</guid><dc:creator>jlapegna</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21697.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=21697</wfw:commentRss><description>&lt;p&gt;Yes, I actually tried that but when I call this.Print() I get the error&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Error&amp;nbsp;2&amp;nbsp;myForm.FormCode&amp;#39; does not contain a definition for &amp;#39;Print&amp;#39;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;I am referencing Microsoft.Office.Infopath already.&amp;nbsp; When I output this.toString() i see &amp;quot;myForm.FormCode&amp;quot;&lt;/p&gt;</description></item><item><title>Re: Can't find XMLForm in OM</title><link>https://www.infopathdev.com:443/forums/thread/21692.aspx</link><pubDate>Mon, 16 Jul 2007 16:06:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21692</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21692.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=21692</wfw:commentRss><description>&lt;p&gt;It&amp;#39;s actually Print() in InfoPath 2007, not PrintOut(): &lt;a href="http://msdn2.microsoft.com/En-US/library/aa944006(VS.80).aspx"&gt;http://msdn2.microsoft.com/En-US/library/aa944006(VS.80).aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Also, your class that VS/VSTA generated for you derives drom XMLForm so you are XMLForm. As such, you simply say:&lt;/p&gt;&lt;p&gt;this.Print()&lt;/p&gt;&lt;p&gt;Hope this does it for you...&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Can't find XMLForm in OM</title><link>https://www.infopathdev.com:443/forums/thread/21690.aspx</link><pubDate>Mon, 16 Jul 2007 15:35:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21690</guid><dc:creator>jlapegna</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21690.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=21690</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;I have a form created in InfoPath 2007, and I would like to add the functionality to print a specific view.&lt;/p&gt;&lt;p&gt;I understand this is achieved through the XMLForm.PrintOut() method.&amp;nbsp; But I cannot seem to find an XMLForm object anywhere in the object model.&amp;nbsp; The &amp;#39;this&amp;#39; object returns a the name of my .cs file (myForm.FormCode.cs), and it does not contain an XMLForms property like the SDK states exists.&lt;/p&gt;&lt;p&gt;How can I get access to the XMLForm method so I can print a view?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Joey&lt;/p&gt;</description></item></channel></rss>