<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Toolbars</title><link>https://www.infopathdev.com:443/forums/thread/85445.aspx</link><pubDate>Tue, 18 Dec 2012 15:59:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:85445</guid><dc:creator>Neil McGrath</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/85445.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=85445</wfw:commentRss><description>Hi, 
I have been successfully hiding the Command bars using the above for some time, my question is how do I get rid of the Ribbon in Office 2010? Looking through the command bars accessed from  
	Application.Windows(Application.Windows.Count -1).CommandBars;
I find 28 in 2007, and 32 in 2010 with index 31 being accName = &amp;quot;Ribbon&amp;quot;

However attempting to set the Enabled property to &amp;#39;false&amp;#39; doesn&amp;#39;t seem to do anything. Presumeably I&amp;#39;m not supposed to disable the ribbon using the CommandBars collection but some other method?

Thanks

Neil</description></item><item><title>Re: Toolbars</title><link>https://www.infopathdev.com:443/forums/thread/31255.aspx</link><pubDate>Thu, 07 Aug 2008 14:28:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31255</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31255.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=31255</wfw:commentRss><description>&lt;p&gt;Hi, and welcome!&lt;/p&gt;
&lt;p&gt;This looks like a JScript sample from &lt;a href="http://msdn.microsoft.com/en-us/library/bb608311.aspx"&gt;this&lt;/a&gt; MSDN article. To use it, first you need to make sure your form template will be using JScript for programming. To set the programming language for you form, please visit &lt;a href="http://support.microsoft.com/kb/828853"&gt;this&lt;/a&gt; link for IP2003 and &lt;a href="http://msdn.microsoft.com/en-us/library/bb250982.aspx"&gt;this&lt;/a&gt; link for IP2007.&lt;/p&gt;
&lt;p&gt;Next, you need to add an onLoad event (or Loading event for IP2007) to your form. Check &lt;a href="http://msdn.microsoft.com/en-us/library/aa942468(VS.80).aspx"&gt;here&lt;/a&gt; for 2003 instructions; in 2007 you can go to &lt;strong&gt;Tools / Programming / On Load Event&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The code, when we add the variable declaration and put it into the event will look like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;function XDocument::OnLoad(eventObj)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;var objCommandBars&amp;nbsp; = Application.ActiveWindow.CommandBars;&lt;br /&gt;&amp;nbsp;objCommandBars(&amp;quot;Menu Bar&amp;quot;).Enabled = false;&lt;br /&gt;&amp;nbsp;objCommandBars(&amp;quot;Standard&amp;quot;).Enabled = false;&lt;br /&gt;&amp;nbsp;objCommandBars(&amp;quot;Formatting&amp;quot;).Enabled = false;&lt;br /&gt;}&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;A word of warning -- I had to make my form Full Trust for this to work. For more information on setting forms to Full Trust, please visit &lt;a href="http://office.microsoft.com/en-us/infopath/HP010967191033.aspx"&gt;this&lt;/a&gt; link.&lt;/p&gt;</description></item><item><title>Toolbars</title><link>https://www.infopathdev.com:443/forums/thread/31246.aspx</link><pubDate>Thu, 07 Aug 2008 10:25:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31246</guid><dc:creator>smods</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31246.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=31246</wfw:commentRss><description>&lt;p&gt;Hi all, &lt;/p&gt;
&lt;p&gt;Complete newbie to Infopath.&amp;nbsp; I want to disable all tool bars when my form is opened.&amp;nbsp; I have found the following code on the internet:&lt;/p&gt;
&lt;p&gt;objCommandBars(&amp;quot;Menu Bar&amp;quot;).Enabled = false;&lt;br /&gt;objCommandBars(&amp;quot;Standard&amp;quot;).Enabled = false;&lt;br /&gt;objCommandBars(&amp;quot;Formatting&amp;quot;).Enabled = false;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My question is, where do I put this?!&amp;nbsp; Can you help me step by step please because I really have no idea!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>