<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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>Office Development with Visual Studio : Ribbon</title><link>http://blogs.msdn.com/vsto/archive/tags/Ribbon/default.aspx</link><description>Tags: Ribbon</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>VSTO Performance: Delay Loading and You (Stephen Peters)</title><link>http://blogs.msdn.com/vsto/archive/2010/01/07/vsto-performance-delay-loading-and-you.aspx</link><pubDate>Thu, 07 Jan 2010 19:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9945334</guid><dc:creator>VSTO Team</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9945334.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9945334</wfw:commentRss><description>&lt;P&gt;There have been a couple of blog posts about delay loading VSTO addins, and with Dev10 being released soon, it’s a good time to expand on the subject a little bit.&lt;/P&gt;
&lt;P&gt;This has been covered before, and I’ll avoid spending too much time here on topics that have already been covered.&amp;nbsp; For an overview of delay loading, please read these posts.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/andreww/archive/2008/07/14/demand-loading-vsto-add-ins.aspx" mce_href="http://blogs.msdn.com/andreww/archive/2008/07/14/demand-loading-vsto-add-ins.aspx"&gt;http://blogs.msdn.com/andreww/archive/2008/07/14/demand-loading-vsto-add-ins.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/andreww/archive/2008/04/19/delay-loading-the-clr-in-office-add-ins.aspx" mce_href="http://blogs.msdn.com/andreww/archive/2008/04/19/delay-loading-the-clr-in-office-add-ins.aspx"&gt;http://blogs.msdn.com/andreww/archive/2008/04/19/delay-loading-the-clr-in-office-add-ins.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;There are many reasons why you would want to delay load your addin, the most important of which is for performance – loading the CLR can easily double the amount of time that it takes to load an Office application. If your addin is only used occasionally, your users will appreciate the faster load times.&lt;/P&gt;
&lt;P&gt;One important improvement that has gone into Dev10 is that you no longer need to manually change the LoadBehavior in the registry for your addin to make it DelayLoad. If you go into project properties of your addin, click on the “Publish” tab, and go into “Options…”, you can adjust the Add-in Load Behavior under “Office Settings”.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/VSTOPerformanceDelayLoadingandYou_9A38/clip_image002_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/VSTOPerformanceDelayLoadingandYou_9A38/clip_image002_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image002 border=0 alt=clip_image002 src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/VSTOPerformanceDelayLoadingandYou_9A38/clip_image002_thumb.jpg" width=595 height=336 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/VSTOPerformanceDelayLoadingandYou_9A38/clip_image002_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;For more information about publishing, please see &lt;A href="http://msdn.microsoft.com/en-us/library/bb608591(VS.100).aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb608591(VS.100).aspx"&gt;Publishing VSTO Solutions&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Now, once you have done this, your addin will not be loaded until Office decides that it needs to load the addin. This can happen a number of ways, but the most common is that a user action (like clicking on a ribbon button) calls into the addin, and causes the addin to be loaded.&lt;/P&gt;
&lt;P&gt;One important note is that any custom “get” handler (getEnabled, getVisible, getLabel) will not trigger the loading of your addin. The first time that your addin is loaded, Office will call the handler and cache the response given, and use that response as the default.&amp;nbsp; It will then call the handler again to use in the current session.&amp;nbsp; This is important because if the control is disabled initially, and then later enabled via a call to RibbonUI.Invalidate or RibbonUI.InvalidateControl, it will only invalidate this second value and not the first value.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Consider the following example where a database connection is necessary for the addin to function:&lt;/P&gt;
&lt;P&gt;XML:&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;group &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;MyGroup&lt;/SPAN&gt;"
       &lt;SPAN style="COLOR: red"&gt;label&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Database controls&lt;/SPAN&gt;"  &lt;SPAN style="COLOR: blue"&gt;&amp;gt;
    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;button &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Button1&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;label&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Get Data&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;onAction&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;GetDataClick&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;getEnabled&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;GetEnabled&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;group&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Callbacks in Ribbon Class:&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;#region &lt;/SPAN&gt;Ribbon Callbacks&lt;/PRE&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Boolean &lt;/SPAN&gt;dbEnabled = &lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;; 
&lt;SPAN style="COLOR: blue"&gt;public void &lt;/SPAN&gt;Ribbon_Load(Office.&lt;SPAN style="COLOR: #2b91af"&gt;IRibbonUI &lt;/SPAN&gt;ribbonUI)
{
    &lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.ribbon = ribbonUI;

    &lt;SPAN style="COLOR: green"&gt;//[aDeveloper] moving the database connection to another thread
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Thread &lt;/SPAN&gt;databaseConnectionThread = 
        &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Thread&lt;/SPAN&gt;(&lt;SPAN style="COLOR: blue"&gt;delegate&lt;/SPAN&gt;()
        { 
            &lt;SPAN style="COLOR: #2b91af"&gt;Thread&lt;/SPAN&gt;.Sleep(500); &lt;SPAN style="COLOR: green"&gt;// todo:  Actually connect
            &lt;/SPAN&gt;dbEnabled = &lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;;
            ribbon.Invalidate();
        });
    databaseConnectionThread.Start();
}

&lt;SPAN style="COLOR: blue"&gt;public &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Boolean &lt;/SPAN&gt;GetEnabled(Office.&lt;SPAN style="COLOR: #2b91af"&gt;IRibbonControl &lt;/SPAN&gt;rc)
{
    &lt;SPAN style="COLOR: blue"&gt;return &lt;/SPAN&gt;dbEnabled;
}

&lt;SPAN style="COLOR: blue"&gt;public void &lt;/SPAN&gt;GetDataClick(Office.&lt;SPAN style="COLOR: #2b91af"&gt;IRibbonControl &lt;/SPAN&gt;rc)
{
    &lt;SPAN style="COLOR: green"&gt;//pull data from the database and populate the spreadsheet with it.
&lt;/SPAN&gt;}
&lt;SPAN style="COLOR: blue"&gt;#endregion
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;This can cause a chicken and egg type situation if by default none of its ribbon controls are available (Ie, they’re not enabled or visible). The next time Office is started, it will use the cached “false” response resulting in none of the controls being enabled, and the user will have no easy way to load the addin and cause the “get” handlers to be called.&lt;/P&gt;
&lt;P&gt;The best way around this issue would be to have a control that is always enabled that calls into the addin and thus would load the addin. You can then call ribbonUI.Invalidate in the custom UI’s onLoad handler to force the Office application to call each “get” handler. &lt;/P&gt;
&lt;P&gt;XML:&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;group &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;MyGroup&lt;/SPAN&gt;"
       &lt;SPAN style="COLOR: red"&gt;label&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Database controls&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;button &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Button0&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;label&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Connect Database&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;onAction&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;ConnectDatabase&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;enabled&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;button &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Button1&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;label&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Get Data&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;onAction&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;GetDataClick&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;getEnabled&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;GetEnabled&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;group&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;Callbacks in Ribbon Class:&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;#region &lt;/SPAN&gt;Ribbon Callbacks&lt;/PRE&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Boolean &lt;/SPAN&gt;dbEnabled = &lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;; 
&lt;SPAN style="COLOR: blue"&gt;public void &lt;/SPAN&gt;Ribbon_Load(Office.&lt;SPAN style="COLOR: #2b91af"&gt;IRibbonUI &lt;/SPAN&gt;ribbonUI)
{
    &lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.ribbon = ribbonUI;
}

&lt;SPAN style="COLOR: blue"&gt;public &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Boolean &lt;/SPAN&gt;GetEnabled(Office.&lt;SPAN style="COLOR: #2b91af"&gt;IRibbonControl &lt;/SPAN&gt;rc)
{
    &lt;SPAN style="COLOR: blue"&gt;return &lt;/SPAN&gt;dbEnabled;
}

&lt;SPAN style="COLOR: blue"&gt;public void &lt;/SPAN&gt;GetDataClick(Office.&lt;SPAN style="COLOR: #2b91af"&gt;IRibbonControl &lt;/SPAN&gt;rc)
{
    &lt;SPAN style="COLOR: green"&gt;//pull data from the database and populate the spreadsheet with it.
&lt;/SPAN&gt;}

&lt;SPAN style="COLOR: blue"&gt;public void &lt;/SPAN&gt;ConnectDatabase(Office.&lt;SPAN style="COLOR: #2b91af"&gt;IRibbonControl &lt;/SPAN&gt;rc)
{
    &lt;SPAN style="COLOR: green"&gt;//[aDeveloper] we don't do this automatically since we don't want to connect to the database
    //             unless the user wants to - there's a chance for a hang if the database isn't
    //             available.
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Thread&lt;/SPAN&gt;.Sleep(500); &lt;SPAN style="COLOR: green"&gt;// todo:  Actually connect
    &lt;/SPAN&gt;dbEnabled = &lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;;
    ribbon.Invalidate();
}
&lt;SPAN style="COLOR: blue"&gt;#endregion
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;Another trick is to have the handler return “true” the first time that it’s called, so that Office caches the “true” response as the default, and the control is enabled.&amp;nbsp; If you do this, you’ll want to make sure that your click handlers can handle the case where the button should be disabled.&lt;/P&gt;
&lt;P&gt;(n.b.:&amp;nbsp; This example is a little bit contrived, but will illustrate what you need to do if your application would be best served by this behavior.)&amp;nbsp; &lt;/P&gt;
&lt;P&gt;In this case, the “Get Data” button will be enabled by default.&amp;nbsp; The first click will generate the message box since by the time that GetDataClick is called, the addin hasn’t had time to ‘connect’, and the button will remain disabled until the connection is done.&lt;/P&gt;
&lt;P&gt;XML:&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;group &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;MyGroup&lt;/SPAN&gt;"
       &lt;SPAN style="COLOR: red"&gt;label&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Database controls&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;button &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Button1&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;label&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Get Data&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;onAction&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;GetDataClick&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;getEnabled&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;GetEnabled&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;group&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;Callbacks in Ribbon Class:&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;#region &lt;/SPAN&gt;Ribbon Callbacks
&lt;SPAN style="COLOR: #2b91af"&gt;Boolean &lt;/SPAN&gt;dbEnabled = &lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;;
&lt;SPAN style="COLOR: #2b91af"&gt;Boolean &lt;/SPAN&gt;firstCall = &lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;;
&lt;SPAN style="COLOR: blue"&gt;public void &lt;/SPAN&gt;Ribbon_Load(Office.&lt;SPAN style="COLOR: #2b91af"&gt;IRibbonUI &lt;/SPAN&gt;ribbonUI)
{
    &lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.ribbon = ribbonUI;
    &lt;SPAN style="COLOR: green"&gt;//[aDeveloper] moving the database connection to another thread so that we don't hang office
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Thread &lt;/SPAN&gt;databaseConnectionThread = 
        &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Thread&lt;/SPAN&gt;(&lt;SPAN style="COLOR: blue"&gt;delegate&lt;/SPAN&gt;()
        { 
            &lt;SPAN style="COLOR: #2b91af"&gt;Thread&lt;/SPAN&gt;.Sleep(5000); &lt;SPAN style="COLOR: green"&gt;// todo:  Actually connect
            &lt;/SPAN&gt;dbEnabled = &lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;;
            ribbon.Invalidate();
        });
    databaseConnectionThread.Start();
}

&lt;SPAN style="COLOR: blue"&gt;public &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Boolean &lt;/SPAN&gt;GetEnabled(Office.&lt;SPAN style="COLOR: #2b91af"&gt;IRibbonControl &lt;/SPAN&gt;rc)
{
    &lt;SPAN style="COLOR: blue"&gt;if &lt;/SPAN&gt;(&lt;SPAN style="COLOR: blue"&gt;true &lt;/SPAN&gt;== firstCall)
    {
        firstCall = &lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;;
        &lt;SPAN style="COLOR: blue"&gt;return true&lt;/SPAN&gt;;
    }
    &lt;SPAN style="COLOR: blue"&gt;return &lt;/SPAN&gt;dbEnabled;
}

&lt;SPAN style="COLOR: blue"&gt;public void &lt;/SPAN&gt;GetDataClick(Office.&lt;SPAN style="COLOR: #2b91af"&gt;IRibbonControl &lt;/SPAN&gt;rc)
{
    &lt;SPAN style="COLOR: blue"&gt;if &lt;/SPAN&gt;(&lt;SPAN style="COLOR: blue"&gt;false &lt;/SPAN&gt;== dbEnabled)
    {
        System.Windows.Forms.&lt;SPAN style="COLOR: #2b91af"&gt;MessageBox&lt;/SPAN&gt;.Show(&lt;SPAN style="COLOR: #a31515"&gt;"Could not connect to database"&lt;/SPAN&gt;);
                
        &lt;SPAN style="COLOR: green"&gt;//Disable this button until we get the connection up.
        &lt;/SPAN&gt;firstCall = &lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;;
        ribbon.Invalidate();
        &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt;;
    }
    &lt;SPAN style="COLOR: green"&gt;//Get the data and populate the spreadsheet
&lt;/SPAN&gt;}
&lt;SPAN style="COLOR: blue"&gt;#endregion
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9945334" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Ribbon/default.aspx">Ribbon</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VS2010/default.aspx">VS2010</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+Development/default.aspx">Office Development</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Visual+Studio+2010/default.aspx">Visual Studio 2010</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Stephen+Peters/default.aspx">Stephen Peters</category></item><item><title>Making a Custom Group Appear in the Message Tab of a Mail Item (Norm Estabrook)</title><link>http://blogs.msdn.com/vsto/archive/2009/12/15/making-a-custom-group-appear-in-the-message-tab-of-a-mail-item-norm-estabrook.aspx</link><pubDate>Tue, 15 Dec 2009 22:14:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9937317</guid><dc:creator>VSTO Team</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9937317.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9937317</wfw:commentRss><description>&lt;p&gt;You can add a custom group to the &lt;strong&gt;Message&lt;/strong&gt; tab of an Outlook mail item.&amp;#160; For example, here is a custom group named &amp;quot;MyCoolGroup&amp;quot; that I added to the message tab of a new message:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_9.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_9.png"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_thumb_3.png" width="674" height="227" mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_thumb_3.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Outlook lets you open a message in the following two modes: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Compose (you are drafting a new message). &lt;/li&gt;    &lt;li&gt;Read (you are reading a message).&amp;#160; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Making a custom group appear for only one of these modes is pretty easy.&amp;#160; Making it appear for both modes is a tad more challenging. That is because the control ID of the &lt;strong&gt;Message&lt;/strong&gt; tab in read mode is different than the control ID of the &lt;strong&gt;Message&lt;/strong&gt; tab in compose mode. When you design your custom group in the VSTO Ribbon designer, you can only specify &lt;strong&gt;one&lt;/strong&gt; control ID. This means that when you run the project, the custom group will only appear in the &lt;strong&gt;Message&lt;/strong&gt; tab of a compose window or the &lt;strong&gt;Message&lt;/strong&gt; tab of a read window depending on which control ID you specify at design-time. &lt;/p&gt;  &lt;p&gt;If you want the group to appear in both versions of the &lt;strong&gt;Message&lt;/strong&gt; tab (read and compose), you have to do a bit more work. Here is how you make the group appear for both modes:&lt;/p&gt;  &lt;p&gt;First, add a &lt;strong&gt;Ribbon (Visual Designer)&lt;/strong&gt; to an Outlook 2007 add-in project.&lt;/p&gt;  &lt;p&gt;Then, set the &lt;strong&gt;RibbonType&lt;/strong&gt; property of the Ribbon to &lt;strong&gt;Microsoft.Outlook.Mail.Read&lt;/strong&gt; as follows:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_10.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_thumb.png" width="283" height="393" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;On the Ribbon designer, add a group to a tab and customize the group as desired.&amp;#160; &lt;/p&gt;  &lt;p&gt;On the Ribbon designer, select the tab, open the &lt;strong&gt;Properties&lt;/strong&gt; window, and then set the &lt;strong&gt;OfficeId&lt;/strong&gt; of the tab to &lt;strong&gt;TabReadMessage&lt;/strong&gt;.&amp;#160; &lt;strong&gt;TabReadMessage&lt;/strong&gt; is the control ID of the default tab that appears on the Ribbon of a mail message that is open in read mode.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_7.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_7.png"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_thumb_2.png" width="405" height="336" mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_thumb_2.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Ok. Now when you run the project, your custom group will appear only if you open a mail item in read mode. Now you need to add second Ribbon to your project to display this custom group in a mail item that is open in compose mode.&lt;/p&gt;  &lt;p&gt;Add a second &lt;strong&gt;Ribbon (Visual Designer)&lt;/strong&gt; to the project. Then, set the &lt;strong&gt;RibbonType&lt;/strong&gt; property of the Ribbon to &lt;strong&gt;Microsoft.Outlook.Mail.Compose&lt;/strong&gt; as follows:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_12.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_thumb_4.png" width="295" height="399" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;On the Ribbon designer, select the tab of the second Ribbon, open the &lt;strong&gt;Properties&lt;/strong&gt; window, and then set the &lt;strong&gt;OfficeId&lt;/strong&gt; of the tab to &lt;strong&gt;TabNewMailMessage&lt;/strong&gt;.&amp;#160; &lt;strong&gt;TabNewMailMessage&lt;/strong&gt; is the control ID of the default tab that appears on the Ribbon of a mail message that is open in compose mode.&amp;#160; &lt;/p&gt;  &lt;p&gt;I know what your thinking. Do you mean I have to create two separate custom groups? That defeats the whole point of trying to do this right?&amp;#160; Yes that would. Fortunately, you don’t have to create two custom groups. You only have to create two Ribbons as I have shown here. You can use the same custom group in both Ribbons.&amp;#160; Here is how:&lt;/p&gt;  &lt;p&gt;Open the first Ribbon that you created in the Ribbon Designer.&amp;#160; In the Ribbon Designer, select your custom group. In the &lt;strong&gt;Properties&lt;/strong&gt; window, set the &lt;strong&gt;Modifiers&lt;/strong&gt; property of the group to &lt;strong&gt;Public&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;Open the code file of the second Ribbon that you created (called Ribbon2 in my project).&lt;/p&gt;  &lt;p&gt;In the constructor of the second Ribbon, add the custom group from Ribbon1 to Ribbon2 as follows: &lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;Ribbon2()
{
    InitializeComponent();
    &lt;span style="color: #2b91af"&gt;Ribbon1 &lt;/span&gt;firstRibbon = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Ribbon1&lt;/span&gt;();
    &lt;span style="color: blue"&gt;this&lt;/span&gt;.tab1.Groups.Add(firstRibbon.group1);
}&lt;/pre&gt;

&lt;p&gt;You can read more about adding custom groups to built-in tabs in the following MSDN articles:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb608593.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb608593.aspx"&gt;How to: Customize a Built-in tab&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb608616.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb608616.aspx"&gt;How to: Get Started Customizing the Ribbon&lt;/a&gt;&lt;/p&gt;
&lt;a href="http://msdn2.microsoft.com/en-us/library/bb386089.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb386089.aspx"&gt;Ribbon Designer&lt;/a&gt; 

&lt;p&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb398246.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb398246.aspx"&gt;Customizing a Ribbon for Outlook&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9937317" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Norm+Estabrook/default.aspx">Norm Estabrook</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Ribbon/default.aspx">Ribbon</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+2007/default.aspx">Office 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VS2008/default.aspx">VS2008</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+Development/default.aspx">Office Development</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+2010/default.aspx">Office 2010</category></item><item><title>Using Office 2010 Extensibility Schemas with VSTO addins for Beta 2 (Stephen Peters)</title><link>http://blogs.msdn.com/vsto/archive/2009/12/04/using-office-2010-extensibility-schemas-with-vsto-addins-for-beta-2-stephen-peters.aspx</link><pubDate>Fri, 04 Dec 2009 22:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9932795</guid><dc:creator>VSTO Team</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9932795.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9932795</wfw:commentRss><description>&lt;P&gt;Office 2010 brings in many new features to the Ribbon and Backstage extensibility. In order to take advantage of those changes in VSTO addins, you will need to update your ribbon XML projects to use the new Office 2010 schema. &lt;/P&gt;
&lt;P&gt;First, you will need to see if the schema is installed. To do this, look in “C:\Program Files\Microsoft Visual Studio 10.0\Xml\Schemas\1033” (you might need to modify this to point to your Visual Studio installation directory). If customui14.xsd is there, you can skip ahead to the next paragraph. Otherwise download the schema from &lt;A href="http://download.microsoft.com/download/F/F/3/FF36D32F-4080-494B-83B8-49DADC68A999/Office2010FluentUISchema.exe" mce_href="http://download.microsoft.com/download/F/F/3/FF36D32F-4080-494B-83B8-49DADC68A999/Office2010FluentUISchema.exe"&gt;here&lt;/A&gt;, and install it in the directory above. When you are done, double check to make sure that the custom14ui.xsd file is there.&lt;/P&gt;
&lt;P&gt;Go to the Ribbon XML item that you want to use on Office 2010. For this blog post I am going to use a Word 2010 addin with a single Ribbon XML item, but the same code can work with any VSTO project with only minor modifications.&lt;/P&gt;
&lt;P&gt;At the top Ribbon1.xml, there is a line&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;customUI &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;xmlns&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="http://schemas.microsoft.com/office/2006/01/customui" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;onLoad&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Ribbon_Load"&amp;gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;/SPAN&gt;
&lt;P&gt;You will want to replace the URL with&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;  http://schemas.microsoft.com/office/2009/07/customui&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;If you look in the properties window for the XML document, the schema for the document should now point to the customui14.xsd that was installed. Now we can play around with it a bit. Under &amp;lt;/ribbon&amp;gt; in Ribbon1.xml, add the following code:&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;backstage&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;tab &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="VSTOTab" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;label&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="VSTO Tab" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;insertAfterMso&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="TabInfo"&amp;gt;
      &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;firstColumn&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;group &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="VSTOGroup" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;label&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Hello From VSTO!"&amp;gt;
          &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;topItems&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
            &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;button &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="AddMoreCowbell"
              &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;label&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Add More Cowbell"
              &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;onAction&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="AddMoreCowbell" /&amp;gt;
          &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;topItems&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
        &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;group&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
      &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;firstColumn&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;tab&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;backstage&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;/SPAN&gt;
&lt;P&gt;We will also need to add the callback to Ribbon1.cs:&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;public void &lt;/SPAN&gt;AddMoreCowbell(Office.&lt;SPAN style="COLOR: #2b91af"&gt;IRibbonControl &lt;/SPAN&gt;control)
{
    System.Windows.Forms.&lt;SPAN style="COLOR: #2b91af"&gt;MessageBox&lt;/SPAN&gt;.Show(&lt;SPAN style="COLOR: #a31515"&gt;"Fever Cured"&lt;/SPAN&gt;);
}&lt;/PRE&gt;
&lt;P&gt;And, of course, the integration in ThisAddin.cs&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;protected override &lt;/SPAN&gt;Microsoft.Office.Core.&lt;SPAN style="COLOR: #2b91af"&gt;IRibbonExtensibility &lt;/SPAN&gt;CreateRibbonExtensibilityObject()
{
    &lt;SPAN style="COLOR: blue"&gt;return new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Ribbon1&lt;/SPAN&gt;();
}&lt;/PRE&gt;
&lt;P&gt;Run your add-in, and when you go to the backstage, you will find the backstage tab that we just added:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/UsingOffice2010ExtensibilitySchemaswithV_C281/clip_image002_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/UsingOffice2010ExtensibilitySchemaswithV_C281/clip_image002_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image002 border=0 alt=clip_image002 src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/UsingOffice2010ExtensibilitySchemaswithV_C281/clip_image002_thumb.jpg" width=244 height=193 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/UsingOffice2010ExtensibilitySchemaswithV_C281/clip_image002_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Now that you have the schemas set up, you can read up more on extending Backstage and new Ribbon features here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ee692176(office.14).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ee692176(office.14).aspx"&gt;Microsoft Office 2010 Technical Articles&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - &lt;A href="http://msdn.microsoft.com/en-us/library/ee815851(office.14).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ee815851(office.14).aspx"&gt;Customizing the Office 2010 Backstage View for Developers&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - &lt;A href="http://msdn.microsoft.com/en-us/library/ee691834(office.14).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ee691834(office.14).aspx"&gt;Ribbon Extensibility in Office 2010: Tab Activation and Auto-Scaling&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://download.microsoft.com/download/F/F/3/FF36D32F-4080-494B-83B8-49DADC68A999/Office2010FluentUISchema.exe" mce_href="http://download.microsoft.com/download/F/F/3/FF36D32F-4080-494B-83B8-49DADC68A999/Office2010FluentUISchema.exe"&gt;Office 2010 Custom UI Schema&lt;/A&gt; (repost from above)&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9932795" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/Ribbon/default.aspx">Ribbon</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+Development/default.aspx">Office Development</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+2010/default.aspx">Office 2010</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Stephen+Peters/default.aspx">Stephen Peters</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Backstage/default.aspx">Backstage</category></item><item><title>Do Your Outlook UI Elements Need Counseling? - Get your Form Regions, Ribbons, and Task Panes Talking to Each Other Again (Norm Estabrook)</title><link>http://blogs.msdn.com/vsto/archive/2009/06/03/do-your-outlook-ui-elements-need-counseling-get-your-form-regions-ribbons-and-task-panes-talking-to-each-other-again-norm-estabrook.aspx</link><pubDate>Thu, 04 Jun 2009 01:30:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9693769</guid><dc:creator>VSTO Team</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9693769.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9693769</wfw:commentRss><description>&lt;p&gt;So you want to open a task pane by using a button on the Ribbon. You also want a form region that appears in an e-mail item to detect the state of a control on a custom task pane so that you can add or remove an option that appears in a Ribbon menu right? Ok, I completely made this scenario up. But at some point, somewhere along the way, you might say to yourself – how do I get to that gallery on my Ribbon from my task pane? or how do I enable the user to populate that combo box on the form region by selecting a control on the Ribbon? Well if that describes something that you are trying to do, then this post is for you. Let’s start with Ribbons. The other two (form regions and task panes) are bit more troublesome.&lt;/p&gt;  &lt;h4&gt;Ribbons&lt;/h4&gt;  &lt;p&gt;Ribbon controls are the easiest to access from other areas of your application. Assuming that your custom Ribbon is named &lt;em&gt;Ribbon1&lt;/em&gt;, here is what you do:&lt;/p&gt;  &lt;p align="left"&gt;&lt;span style="color: #2b91af"&gt;ThisRibbonCollection &lt;/span&gt;ribbonCollection =    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #2b91af"&gt;Globals&lt;/span&gt;.Ribbons    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [&lt;span style="color: #2b91af"&gt;Globals&lt;/span&gt;.ThisAddIn.Application.ActiveInspector()];    &lt;br /&gt;ribbonCollection.Ribbon1.comboBox1.Text = &lt;span style="color: #a31515"&gt;&amp;quot;Hello World&amp;quot;&lt;/span&gt;;&lt;/p&gt;  &lt;p&gt;You can read more about this &lt;a href="http://msdn.microsoft.com/en-us/library/bb772088.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;h4&gt;Form Regions&lt;/h4&gt;  &lt;p&gt;For the VB folks, this is a snap. C# developers have to do a bit more work. That is because by default, in a C# project, the controls that you add to a form region are private. For each control that you want to access, you have to set the &lt;strong&gt;Modifiers&lt;/strong&gt; property of the control to &lt;strong&gt;Internal &lt;/strong&gt;or &lt;strong&gt;Public&lt;/strong&gt;. For example: &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/OutlookUICounselingGetyourFormRegionsRib_E1EA/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/OutlookUICounselingGetyourFormRegionsRib_E1EA/image_thumb.png" width="321" height="360" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can then add code to access the control. For example, assuming that your form region is named &lt;em&gt;FormRegion1&lt;/em&gt;, you could use the following code:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;WindowFormRegionCollection &lt;/span&gt;formRegions =
    &lt;span style="color: #2b91af"&gt;Globals&lt;/span&gt;.FormRegions
        [&lt;span style="color: #2b91af"&gt;Globals&lt;/span&gt;.ThisAddIn.Application.ActiveInspector()];
formRegions.FormRegion1.textBox1.Text = &lt;span style="color: #a31515"&gt;&amp;quot;Hello World&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

&lt;p&gt;You can read more about this &lt;a href="http://msdn.microsoft.com/en-us/library/bb772084.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;Custom Task Panes&lt;/h4&gt;

&lt;p&gt;Controls on task panes require the same tweaks described for form regions above.&amp;#160; Here is an example of how to get to a button on a task pane. This example makes the following assumptions:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;The user control of the custom task pane is named &lt;em&gt;MyUserControl&lt;/em&gt;. &lt;/li&gt;

  &lt;li&gt;The task pane is named &lt;em&gt;myCustomTaskPane&lt;/em&gt; and it is declared as public in your code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;((&lt;span style="color: #2b91af"&gt;MyUserControl&lt;/span&gt;)&lt;span style="color: #2b91af"&gt;Globals&lt;/span&gt;.ThisAddIn.myCustomTaskPane.Control).button1.Text = &lt;span style="color: #a31515"&gt;&amp;quot;It Worked&amp;quot;&lt;/span&gt;;&lt;/p&gt;

&lt;p&gt;If have not yet created a custom task pane, see &lt;a href="http://msdn.microsoft.com/en-us/library/aa942846.aspx"&gt;this topic&lt;/a&gt; and it will all make sense.&lt;/p&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;As a side note, if you are adding custom task panes to Outlook Inspector windows, you have to write a bit of code to map each Inspector window with it’s own instance of a custom task pane. If you don’t do this mapping, you get all kinds of wacky issues.&amp;#160; For an example of how to do this, see the following &lt;a href="http://msdn.microsoft.com/en-us/library/bb296010.aspx"&gt;article&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For the sake of being thorough, here is an example of how you can access a task pane created by using the guidance in that &lt;a href="http://msdn.microsoft.com/en-us/library/bb296010.aspx"&gt;article&lt;/a&gt;.&amp;#160; &lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;private void &lt;/span&gt;toggleButton1_Click(&lt;span style="color: blue"&gt;object &lt;/span&gt;sender, &lt;span style="color: #2b91af"&gt;RibbonControlEventArgs &lt;/span&gt;e)
{
    Outlook.&lt;span style="color: #2b91af"&gt;Inspector &lt;/span&gt;inspector = (Outlook.&lt;span style="color: #2b91af"&gt;Inspector&lt;/span&gt;)e.Control.Context;
    &lt;span style="color: #2b91af"&gt;InspectorWrapper &lt;/span&gt;inspectorWrapper = &lt;span style="color: #2b91af"&gt;Globals&lt;/span&gt;.ThisAddIn.InspectorWrappers[inspector];
    &lt;span style="color: #2b91af"&gt;CustomTaskPane &lt;/span&gt;taskPane = inspectorWrapper.CustomTaskPane;
    &lt;span style="color: blue"&gt;if &lt;/span&gt;(taskPane != &lt;span style="color: blue"&gt;null&lt;/span&gt;)
    {
        taskPane.Visible = ((&lt;span style="color: #2b91af"&gt;RibbonToggleButton&lt;/span&gt;)sender).Checked;
        taskPane.DockPosition = Microsoft.Office.Core.&lt;span style="color: #2b91af"&gt;MsoCTPDockPosition&lt;/span&gt;.msoCTPDockPositionBottom;
        taskPane.Height = 475;
    }
}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;Hope this helps!&lt;/p&gt;

&lt;p&gt;Norm E.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9693769" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Norm+Estabrook/default.aspx">Norm Estabrook</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Ribbon/default.aspx">Ribbon</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+2007/default.aspx">Office 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VS2008/default.aspx">VS2008</category><category domain="http://blogs.msdn.com/vsto/archive/tags/add-ins/default.aspx">add-ins</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+Development/default.aspx">Office Development</category></item><item><title>Making a Custom Ribbon Appear Only for a Custom Outlook Form (Norm Estabrook)</title><link>http://blogs.msdn.com/vsto/archive/2009/01/28/making-a-custom-ribbon-appear-only-for-a-custom-outlook-form.aspx</link><pubDate>Wed, 28 Jan 2009 23:09:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9381689</guid><dc:creator>VSTO Team</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9381689.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9381689</wfw:commentRss><description>&lt;p&gt;Many of you have posted questions to the &lt;a href="http://social.msdn.microsoft.com/forums/en-US/vsto/threads/"&gt;VSTO Forum&lt;/a&gt; about how to make custom tabs, groups and controls appear only in cases where the user opens a custom form in Outlook. &lt;/p&gt;  &lt;p&gt;The reason why that is difficult to accomplish is because there is no way to specify the names of custom forms in the Ribbon Designer. You can only specify inspector window types.&lt;/p&gt;  &lt;p&gt;So if I set the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.office.tools.ribbon.officeribbon.ribbontype.aspx"&gt;RibbonType&lt;/a&gt; property of the Ribbon to “Microsoft.Outlook.Mail.Compose”,&amp;#160; then the Ribbon controls appear for all new mail items &lt;strong&gt;including&lt;/strong&gt; items that I create by using a custom mail form. So how can I make sure that the Ribbon controls only appear in my custom mail form? &lt;/p&gt;  &lt;p&gt;One possible workaround is to show and hide controls based on the message class of an Outlook form. It seemed to work for me and here is how I did it.&lt;/p&gt;  &lt;p&gt;In the Ribbon designer, set the &lt;strong&gt;Visible&lt;/strong&gt; property of your custom controls to false. At this point, those controls will not appear in any Outlook form custom or otherwise.&lt;/p&gt;  &lt;p&gt;Next, add a property to the ThisAddIn class that stores the name of a custom message class as follows:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;private string &lt;/span&gt;strMessageClass = &lt;span style="color: #a31515"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;
&lt;span style="color: blue"&gt;public string &lt;/span&gt;MessageClass
{
    &lt;span style="color: blue"&gt;get
    &lt;/span&gt;{
        &lt;span style="color: blue"&gt;return &lt;/span&gt;strMessageClass;
    }
    &lt;span style="color: blue"&gt;set
    &lt;/span&gt;{
        strMessageClass = &lt;span style="color: blue"&gt;value&lt;/span&gt;;
    }
}&lt;/pre&gt;

&lt;p&gt;Create an event handler for the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.inspectorsevents_newinspectoreventhandler.aspx"&gt;NewInspector&lt;/a&gt; event. This event is raised every time a new Outlook inspector is open. The item that opens in the inspector has a message class name. For example, if you open a standard mail item, the message class name of the item is “IPM.Note”. A custom form based on a standard email form might have the message class name “IPM.Note.MyCustomForm”.&lt;/p&gt;

&lt;p&gt;In the event handler, set your custom string property to the message class name of the open item. Here is an example:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;private &lt;/span&gt;Outlook.&lt;span style="color: #2b91af"&gt;Inspectors &lt;/span&gt;inspectors;
&lt;span style="color: blue"&gt;private void &lt;/span&gt;ThisAddIn_Startup(&lt;span style="color: blue"&gt;object &lt;/span&gt;sender, System.&lt;span style="color: #2b91af"&gt;EventArgs &lt;/span&gt;e)
{
    inspectors = &lt;span style="color: blue"&gt;this&lt;/span&gt;.Application.Inspectors;
    inspectors.NewInspector +=
        &lt;span style="color: blue"&gt;new &lt;/span&gt;Microsoft.Office.Interop.Outlook.&lt;span style="color: #2b91af"&gt;InspectorsEvents_NewInspectorEventHandler
            &lt;/span&gt;(Inspectors_NewInspector);

}

&lt;span style="color: blue"&gt;void &lt;/span&gt;Inspectors_NewInspector(Microsoft.Office.Interop.Outlook.&lt;span style="color: #2b91af"&gt;Inspector &lt;/span&gt;Inspector)
{
    Outlook.&lt;span style="color: #2b91af"&gt;MailItem &lt;/span&gt;tmpMailItem = (Outlook.&lt;span style="color: #2b91af"&gt;MailItem&lt;/span&gt;)Inspector.CurrentItem;
    &lt;span style="color: blue"&gt;if &lt;/span&gt;(tmpMailItem != &lt;span style="color: blue"&gt;null&lt;/span&gt;)
        MessageClass = tmpMailItem.MessageClass;
}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;In the load event of your Ribbon class, check your custom string property to determine the message class of the item that is attempting to load your custom Ribbon. If the name matches the name of your custom message class, you can show the controls on your custom Ribbon. Here is an example:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;private void &lt;/span&gt;Ribbon1_Load(&lt;span style="color: blue"&gt;object &lt;/span&gt;sender, &lt;span style="color: #2b91af"&gt;RibbonUIEventArgs &lt;/span&gt;e)
{
    &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Globals&lt;/span&gt;.ThisAddIn.MessageClass == &lt;span style="color: #a31515"&gt;&amp;quot;IPM.Note.Norm&amp;quot;&lt;/span&gt;)
    {
        group1.Visible = &lt;span style="color: blue"&gt;true&lt;/span&gt;;
        &lt;span style="color: #2b91af"&gt;Globals&lt;/span&gt;.ThisAddIn.MessageClass = &lt;span style="color: #a31515"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;
    }
    

}&lt;/pre&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9381689" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Norm+Estabrook/default.aspx">Norm Estabrook</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Ribbon/default.aspx">Ribbon</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+2007/default.aspx">Office 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VS2008/default.aspx">VS2008</category></item><item><title>Setting the Width of a Drop Down, Combo Box, or Edit Box in the Ribbon Designer (Norm Estabrook)</title><link>http://blogs.msdn.com/vsto/archive/2008/12/19/setting-the-width-of-a-drop-down-combo-box-or-edit-box-in-the-ribbon-designer.aspx</link><pubDate>Fri, 19 Dec 2008 21:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9242650</guid><dc:creator>VSTO Team</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9242650.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9242650</wfw:commentRss><description>&lt;P&gt;Recently, a developer posted a question to the &lt;A href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1018&amp;amp;SiteID=1" mce_href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1018&amp;amp;SiteID=1"&gt;VSTO forum&lt;/A&gt; asking us how to set the width of a drop down control by using the Ribbon Designer (&lt;A href="http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/8965ae5a-9c02-4aec-9178-675650b7044e/" mce_href="http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/8965ae5a-9c02-4aec-9178-675650b7044e/"&gt;http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/8965ae5a-9c02-4aec-9178-675650b7044e/&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;As this person experienced, if you do not set the width of the control, the text that appears in a drop down, combo box, or edit box will truncate. For example, the string “I love Visual Studio Tools for Office!” is truncated in the following drop down:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/SettingtheWidthofaDropDownComboBoxorEdit_99C4/clip_image002_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/SettingtheWidthofaDropDownComboBoxorEdit_99C4/clip_image002_2.jpg"&gt;&lt;IMG title=clip_image002 style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; DISPLAY: inline; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=191 alt=clip_image002 src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/SettingtheWidthofaDropDownComboBoxorEdit_99C4/clip_image002_thumb.jpg" width=238 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/SettingtheWidthofaDropDownComboBoxorEdit_99C4/clip_image002_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;So how do you fix this? The magic lies in the &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.office.tools.ribbon.ribbondropdown.sizestring.aspx" mce_href="http://msdn.microsoft.com/en-us/library/microsoft.office.tools.ribbon.ribbondropdown.sizestring.aspx"&gt;SizeString&lt;/A&gt;&lt;B&gt; &lt;/B&gt;property. However, the use of this property is not so obvious. Instead of setting this property to a number such as &lt;B&gt;20 &lt;/B&gt;for 20 characters of space, you must type an actual character for each character’s worth of space you want to allocate for the text width. &lt;/P&gt;
&lt;P&gt;For example, to make enough space for the string “I love Visual Studio Tools for Office!”, set the &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.office.tools.ribbon.ribbondropdown.sizestring.aspx" mce_href="http://msdn.microsoft.com/en-us/library/microsoft.office.tools.ribbon.ribbondropdown.sizestring.aspx"&gt;SizeString&lt;/A&gt; property of the drop down to “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx” or “jlkjlkjlkjlkjdlslaledfoplklksjjklsfdf” etc. &lt;/P&gt;
&lt;P&gt;You can also decrease the size of the text area to show fewer characters than appear by default. For example, just set &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.office.tools.ribbon.ribbondropdown.sizestring.aspx" mce_href="http://msdn.microsoft.com/en-us/library/microsoft.office.tools.ribbon.ribbondropdown.sizestring.aspx"&gt;SizeString&lt;/A&gt; to “xx” if you want only two characters to appear. &lt;/P&gt;
&lt;P&gt;Norm E.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9242650" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Norm+Estabrook/default.aspx">Norm Estabrook</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Ribbon/default.aspx">Ribbon</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+2007/default.aspx">Office 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VS2008/default.aspx">VS2008</category></item><item><title>Word Add-ins Part 1: Clear the Ribbon Except for My Controls (Harry Miller)</title><link>http://blogs.msdn.com/vsto/archive/2008/09/02/word-add-ins-part-1-clear-the-ribbon-except-for-my-controls-harry-miller.aspx</link><pubDate>Wed, 03 Sep 2008 04:48:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8921095</guid><dc:creator>VSTO Team</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/vsto/comments/8921095.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=8921095</wfw:commentRss><description>&lt;p&gt;You can easily customize the Ribbon to show only the controls you want to display. This video shows how to clear the Ribbon in Microsoft Office Word so it contains only a single button. The button inserts a graphic into the open Word document at the cursor location. Why? Well, really it's just to demo the Ribbon thing. But some day you might want to insert images into a document too, who knows? &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Related resources&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://forums.microsoft.com/Forums/ShowPost.aspx?PostID=3473523&amp;amp;SiteID=1" target="_blank"&gt;Forum: Ribbon and Start from Scratch&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.office.tools.ribbon.officeribbon.startfromscratch.aspx" target="_blank"&gt;OfficeRibbon.StartFromScratch Property&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Duration: 4 minutes, 11 seconds&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:08a9521f-9809-4d50-901a-97db37da205c" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;div id="b7c209cd-9ccf-4ffa-bd93-552871efb689" style="margin: 0px; padding: 0px; display: inline;"&gt;&lt;div&gt;&lt;a href="http://video.msn.com/video.aspx?vid=545e2786-d1b4-494e-86f8-ff1b79761d64&amp;amp;from=writer" target="_new"&gt;&lt;img src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/WordAddinsPart1CleartheRibbonExceptforMy_10579/videoe3bd0f5b2b79.jpg" galleryimg="no" onload="var downlevelDiv = document.getElementById('b7c209cd-9ccf-4ffa-bd93-552871efb689'); downlevelDiv.innerHTML = &amp;quot;&amp;lt;div&amp;gt;&amp;lt;embed src=\&amp;quot;http://images.video.msn.com/flash/soapbox1_1.swf\&amp;quot; quality=\&amp;quot;high\&amp;quot; width=\&amp;quot;432\&amp;quot; height=\&amp;quot;364\&amp;quot; wmode=\&amp;quot;transparent\&amp;quot; type=\&amp;quot;application/x-shockwave-flash\&amp;quot; pluginspage=\&amp;quot;http://macromedia.com/go/getflashplayer\&amp;quot; flashvars=\&amp;quot;c=v&amp;amp;v=545e2786-d1b4-494e-86f8-ff1b79761d64&amp;amp;from=writer\&amp;quot; &amp;gt;&amp;lt;\/embed&amp;gt;&amp;lt;\/div&amp;gt;&amp;quot;;" alt=""&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8921095" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/Ribbon/default.aspx">Ribbon</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Harry+Miller/default.aspx">Harry Miller</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Word+2007/default.aspx">Word 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/video/default.aspx">video</category></item><item><title>Activating a Custom Tab on the Ribbon When a Document Is Opened (Harry Miller)</title><link>http://blogs.msdn.com/vsto/archive/2008/08/12/activating-a-custom-tab-on-the-ribbon-when-a-document-is-opened.aspx</link><pubDate>Wed, 13 Aug 2008 03:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8854760</guid><dc:creator>VSTO Team</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/vsto/comments/8854760.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=8854760</wfw:commentRss><description>&lt;P&gt;A lot of people would like to do this. It makes sense that a developer would want to select the custom tab automatically, if the controls that are most useful for the current document are all on that tab. This video goes in-depth about this programming question.&lt;/P&gt;
&lt;P&gt;OK, not really. The video just says you can't do it, because the Ribbon is designed with the idea of leaving the user in control of the UI -- no surprise selection changes. But you should watch the video anyway. It's really short, and, you know, kinda funny.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Related resources&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://forums.microsoft.com/Forums/ShowPost.aspx?PostID=1059018&amp;amp;SiteID=1" target=_blank mce_href="http://forums.microsoft.com/Forums/ShowPost.aspx?PostID=1059018&amp;amp;SiteID=1"&gt;Forum: Is there a way to activate a certain tab on the Ribbon?&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Duration: 1 minute, 8 seconds&lt;/P&gt;
&lt;DIV class=wlWriterSmartContent id=scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:a249ef91-40a2-420a-af57-b26e4a121060 style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;
&lt;DIV id=599952dc-b447-4178-8edc-1bbdd4a52a1d style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;
&lt;DIV&gt;&lt;A href="http://video.msn.com/video.aspx?vid=102e9415-068f-49c3-80db-72e06534de77&amp;amp;from=writer" target=_new mce_href="http://video.msn.com/video.aspx?vid=102e9415-068f-49c3-80db-72e06534de77&amp;amp;from=writer"&gt;&lt;IMG alt="" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/ActivatingaCustomTabontheRibbonWhenaDocu_F532/videofa43ebd4e05a.jpg" onload="var downlevelDiv = document.getElementById('599952dc-b447-4178-8edc-1bbdd4a52a1d'); downlevelDiv.innerHTML = &amp;quot;&lt;div&gt;&lt;embed src=\&amp;quot;http://images.video.msn.com/flash/soapbox1_1.swf\&amp;quot; quality=\&amp;quot;high\&amp;quot; width=\&amp;quot;432\&amp;quot; height=\&amp;quot;364\&amp;quot; wmode=\&amp;quot;transparent\&amp;quot; type=\&amp;quot;application/x-shockwave-flash\&amp;quot; pluginspage=\&amp;quot;http://macromedia.com/go/getflashplayer\&amp;quot; flashvars=\&amp;quot;c=v&amp;amp;v=102e9415-068f-49c3-80db-72e06534de77&amp;amp;from=writer\&amp;quot; &gt;&lt;\/embed&gt;&lt;\/div&gt;&amp;quot;;" galleryimg="no" mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/ActivatingaCustomTabontheRibbonWhenaDocu_F532/videofa43ebd4e05a.jpg"&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8854760" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/Ribbon/default.aspx">Ribbon</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Harry+Miller/default.aspx">Harry Miller</category><category domain="http://blogs.msdn.com/vsto/archive/tags/video/default.aspx">video</category></item><item><title>Share a Ribbon Customization between Office Applications (Norm Estabrook)</title><link>http://blogs.msdn.com/vsto/archive/2008/03/10/share-a-ribbon-customization-between-office-applications.aspx</link><pubDate>Mon, 10 Mar 2008 23:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8137160</guid><dc:creator>VSTO Team</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/vsto/comments/8137160.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=8137160</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;We have received feedback from several folks that they would like design one Ribbon by using the Ribbon visual designer, and then re-use that same Ribbon in more than one Office application. This approach makes sense. If my custom tab looks the same for each application, I really don’t want to create the same Ribbon in&amp;nbsp;four separate Office projects.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;So I poked around to see if this was possible. I caught up with one of developers who created the VSTO Ribbon designer and he showed me exactly how to do it. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;First, add a Ribbon to a VSTO project. Then, copy the Ribbon code files to a class library project. Finally, add a reference to the class library assembly from within any VSTO project and voila. Well, it’s a tad more challenging.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Here are all the detailed steps.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Create the Ribbon&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l2 level1 lfo1; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;1.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Create a 2007 Excel, Outlook, PowerPoint, or Word project in Visual Studio. For the purpose of these steps, create a C# project and name the project &lt;I style="mso-bidi-font-style: normal"&gt;RibbonStarterProject&lt;/I&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l2 level1 lfo1; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;2.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Add a &lt;B style="mso-bidi-font-weight: normal"&gt;Ribbon (Visual Designer)&lt;/B&gt; item to the project. For the purpose of these steps, accept the default name “Ribbon1”.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l2 level1 lfo1; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;3.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Save and close the project.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Create a Class Library Project&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo3; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;1.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Create a new class library project in Visual Studio. For the purpose of these steps, name the project &lt;I style="mso-bidi-font-style: normal"&gt;SharedRibbonLibrary&lt;/I&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 1.5pt 0in 1.5pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo3; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;2.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Add a project reference to the &lt;B style="mso-bidi-font-weight: normal"&gt;Microsoft.Office.Tools.Common.v9.0&lt;/B&gt; assembly.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 1.5pt 0in 1.5pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo3; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;3.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;On the &lt;SPAN class=ui&gt;&lt;STRONG&gt;Project&lt;/STRONG&gt;&lt;/SPAN&gt; Menu in Visual Studio, click &lt;SPAN class=ui&gt;&lt;STRONG&gt;Add Existing Item&lt;/STRONG&gt;&lt;/SPAN&gt;. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=NumberedList1 style="MARGIN: 3pt 0in 3pt 0.25in; mso-list: l1 level1 lfo3"&gt;&lt;SPAN style="mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Verdana&gt;4.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;FONT face=Verdana&gt;In the &lt;SPAN class=ui&gt;&lt;STRONG&gt;Add Existing Item&lt;/STRONG&gt;&lt;/SPAN&gt; dialog box, browse to the “RibbonStarterProject” project directory, select the Ribbon.cs file, and click &lt;B style="mso-bidi-font-weight: normal"&gt;Add&lt;/B&gt;. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Ribbon1.cs is copied to the project directory and appears beneath the project node in &lt;SPAN class=ui&gt;&lt;STRONG&gt;Solution Explorer&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo3; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;5.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Double-click &lt;B style="mso-bidi-font-weight: normal"&gt;Ribbon1.cs&lt;/B&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;The Ribbon designer appears.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 1.5pt 0in 1.5pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo3; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;6.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;From the &lt;SPAN class=ui&gt;&lt;STRONG&gt;Office Ribbon Controls &lt;/STRONG&gt;&lt;/SPAN&gt;tab of the &lt;SPAN class=ui&gt;&lt;STRONG&gt;Toolbox&lt;/STRONG&gt;&lt;/SPAN&gt;, drag a button onto &lt;SPAN class=ui&gt;&lt;STRONG&gt;group1&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 1.5pt 0in 1.5pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo3; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;7.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Click &lt;SPAN class=ui&gt;&lt;STRONG&gt;button1&lt;/STRONG&gt;&lt;/SPAN&gt; to select it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 1.5pt 0in 1.5pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo3; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;8.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;In the &lt;SPAN class=ui&gt;&lt;STRONG&gt;Properties &lt;/STRONG&gt;&lt;/SPAN&gt;window, set &lt;SPAN class=ui&gt;&lt;STRONG&gt;Modifiers&lt;/STRONG&gt;&lt;/SPAN&gt; to &lt;SPAN class=input&gt;&lt;STRONG&gt;Public&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 1.5pt 0in 1.5pt 0.25in"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Note:&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;By default, controls that you add to the Ribbon are Internal. That makes them only accessible to code inside the same assembly. However, when you access these controls, you will be accessing them through an assembly reference. Therefore, to reach them from code, you must make them public. More on this soon.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo3; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;9.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Right-click the Ribbon designer, and then click &lt;B style="mso-bidi-font-weight: normal"&gt;Properties&lt;/B&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo3; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;10.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;In the &lt;B style="mso-bidi-font-weight: normal"&gt;Properties&lt;/B&gt; window, click the &lt;SPAN class=ui&gt;&lt;STRONG&gt;RibbonType&lt;/STRONG&gt;&lt;/SPAN&gt; property, and then select the Ribbon ID’s of the applications or Outlook Inspector windows in which you want the Ribbon to appear. For more information about this property, see the MSDN reference topic for the &lt;A href="http://msdn2.microsoft.com/en-us/library/microsoft.office.tools.ribbon.officeribbon.ribbontype.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/microsoft.office.tools.ribbon.officeribbon.ribbontype.aspx"&gt;RibbonType&lt;/A&gt; property.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo3; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;11.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;In &lt;B style="mso-bidi-font-weight: normal"&gt;Solution Explorer&lt;/B&gt;, right-click &lt;B style="mso-bidi-font-weight: normal"&gt;Ribbon1.cs&lt;/B&gt;, and then click &lt;B style="mso-bidi-font-weight: normal"&gt;View Code&lt;/B&gt;.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo3; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;12.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Change the namespace of the class to “SharedRibbonLibrary”.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo3; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;13.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Repeat this step for the Ribbon1.designer.cs file.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo3; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;14.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Compile and save the SharedRibbonLibrary project. You can now use the resulting assembly in any VSTO project that supports the Ribbon.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Consume the Ribbon Customization&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo4; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;1.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Create 2007 Excel, Outlook, PowerPoint, or Word project.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo4; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;2.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Add a reference to the SharedRibbonLibrary assembly.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo4; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;3.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Add the following code to the &lt;SPAN class=code&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-ansi-font-size: 10.0pt"&gt;&lt;FONT color=#000066&gt;ThisAddin&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;, &lt;/SPAN&gt;&lt;SPAN class=code&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-ansi-font-size: 10.0pt"&gt;&lt;FONT color=#000066&gt;ThisWorkbook&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;, or &lt;/SPAN&gt;&lt;SPAN class=code&gt;&lt;SPAN style="FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-ansi-font-size: 10.0pt"&gt;&lt;FONT color=#000066&gt;ThisDocument&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt; class of your project. This code overrides the &lt;B&gt;CreateRibbonExtensibilityObject&lt;/B&gt; method and returns the Ribbon to the Office application.&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;protected&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: blue"&gt;override&lt;/SPAN&gt; Microsoft.Office.Core.&lt;SPAN style="COLOR: #2b91af"&gt;IRibbonExtensibility&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;CreateRibbonExtensibilityObject()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; Microsoft.Office.Tools.Ribbon.&lt;SPAN style="COLOR: #2b91af"&gt;RibbonManager&lt;/SPAN&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; Microsoft.Office.Tools.Ribbon.&lt;SPAN style="COLOR: #2b91af"&gt;OfficeRibbon&lt;/SPAN&gt;[] { &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;SharedRibbonLibrary.&lt;SPAN style="COLOR: #2b91af"&gt;Ribbon1&lt;/SPAN&gt;() });&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo4; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;4.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Add a new class to the project. Accept the default name “Class1.cs”.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo4; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;5.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Replace the code in the Class1 file with the following:&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;partial&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: blue"&gt;class&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;ThisRibbonCollection&lt;/SPAN&gt; : Microsoft.Office.Tools.Ribbon.&lt;SPAN style="COLOR: #2b91af"&gt;RibbonReadOnlyCollection&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;internal&lt;/SPAN&gt; SharedRibbonLibrary.&lt;SPAN style="COLOR: #2b91af"&gt;Ribbon1&lt;/SPAN&gt; Ribbon1&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;get&lt;/SPAN&gt; { &lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.GetRibbon&amp;lt;SharedRibbonLibrary.&lt;SPAN style="COLOR: #2b91af"&gt;Ribbon1&lt;/SPAN&gt;&amp;gt;(); }&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;}&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Ok – You are done! You can now access the Ribbon and the button that you added to the Ribbon in your code.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Lets try by handling an event in the consuming project.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Handle the Button Click Event&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo5; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;1.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Add the following code to the startup event handler of project. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #2b91af; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;Globals&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;.Ribbons.Ribbon1.button1.Click += &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;EventHandler&lt;/SPAN&gt;&amp;lt;Microsoft.Office.Tools.Ribbon.&lt;SPAN style="COLOR: #2b91af"&gt;RibbonControlEventArgs&lt;/SPAN&gt;&amp;gt;(button1_Click);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo5; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;2.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Add the following event handler to your project:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; button1_Click(&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; sender, &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;Microsoft.Office.Tools.Ribbon.&lt;SPAN style="COLOR: #2b91af"&gt;RibbonControlEventArgs&lt;/SPAN&gt; e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;System.Windows.Forms.&lt;SPAN style="COLOR: #2b91af"&gt;MessageBox&lt;/SPAN&gt;.Show(&lt;SPAN style="COLOR: #a31515"&gt;"I can handle events!"&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo5; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;3.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;Run the project. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo5; tab-stops: list .25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;4.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;When the Office application opens, click the &lt;B style="mso-bidi-font-weight: normal"&gt;Add-Ins&lt;/B&gt; tab, and then click your button. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;A message that says “I can handle events!” appears.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;- Norm Estabrook&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"&gt;&lt;EM&gt;&lt;SPAN lang=EN style="FONT-FAMILY: Corbel; mso-ansi-language: EN"&gt;&lt;FONT size=3&gt;Programming Writer for BizApps User Education&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8137160" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Norm+Estabrook/default.aspx">Norm Estabrook</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Ribbon/default.aspx">Ribbon</category></item><item><title>New Power Tools - Ribbon IDs Tool Window (Kemp Brown)</title><link>http://blogs.msdn.com/vsto/archive/2008/03/05/new-power-tools-ribbon-ids-tool-window.aspx</link><pubDate>Thu, 06 Mar 2008 02:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8059368</guid><dc:creator>VSTO Team</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/vsto/comments/8059368.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=8059368</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face=Corbel size=3&gt;The Visual Studio 2008 Tools for Office team just released a cool suite of productivity apps for VS Office development called the &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=46B6BF86-E35D-4870-B214-4D7B72B02BF9&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyId=46B6BF86-E35D-4870-B214-4D7B72B02BF9&amp;amp;displaylang=en"&gt;VSTO Power Tools&lt;/A&gt;. One of the tools included is the &lt;STRONG&gt;Ribbon IDs Tool Window&lt;/STRONG&gt;, an add-in tool window for VS that lets you browse the MSO icons that come with Office. You can use these icons to spiff up your custom Ribbon controls. All you need to do is click an icon in the Ribbon IDs Tool Window to obtain its ID, and then plug the value into the control's &lt;STRONG&gt;OfficeImageID&lt;/STRONG&gt; property. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Corbel size=3&gt;I've recorded a short video that demonstrates the tool window and how to use it to customize some Ribbon controls:&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV class=wlWriterSmartContent id=scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:37484c53-ffb3-417d-99df-daa26070ea23 style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;
&lt;DIV id=e221930f-8c7f-44eb-aec7-27b871117b4f style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;
&lt;DIV&gt;&lt;A href="http://video.msn.com/video.aspx?vid=00799b82-92a9-484d-8c22-2d27812858ec&amp;amp;from=writer" target=_new mce_href="http://video.msn.com/video.aspx?vid=00799b82-92a9-484d-8c22-2d27812858ec&amp;amp;from=writer"&gt;&lt;IMG alt="" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/NewPowerToolsRibbonIDsToolWindow_E049/video56bd8264984d.jpg" onload="var downlevelDiv = document.getElementById('e221930f-8c7f-44eb-aec7-27b871117b4f'); downlevelDiv.innerHTML = &amp;quot;&lt;div&gt;&lt;embed src=\&amp;quot;http://images.video.msn.com/flash/soapbox1_1.swf\&amp;quot; quality=\&amp;quot;high\&amp;quot; width=\&amp;quot;432\&amp;quot; height=\&amp;quot;364\&amp;quot; wmode=\&amp;quot;transparent\&amp;quot; type=\&amp;quot;application/x-shockwave-flash\&amp;quot; pluginspage=\&amp;quot;http://macromedia.com/go/getflashplayer\&amp;quot; flashvars=\&amp;quot;c=v&amp;amp;v=00799b82-92a9-484d-8c22-2d27812858ec&amp;amp;from=writer\&amp;quot; &gt;&lt;\/embed&gt;&lt;\/div&gt;&amp;quot;;" mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/NewPowerToolsRibbonIDsToolWindow_E049/video56bd8264984d.jpg" galleryimg="no"&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face=Corbel size=3&gt;There are a couple of additional items not in the video that bear mentioning:&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT face=Corbel size=3&gt;You can also use this tool with XML-based ribbons, even dragging-and-dropping the icon value into the XML.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Corbel size=3&gt;You are not limited to using only MSO images in your controls, although that this is the purpose of this tool.&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;FONT face=Corbel size=3&gt;Here are links to the Help topics I mentioned at the end of the video:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/bb386097.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb386097.aspx"&gt;&lt;FONT face=Corbel size=3&gt;Ribbon Overview&lt;/FONT&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/bb608616.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb608616.aspx"&gt;&lt;FONT face=Corbel size=3&gt;How to: Get Started Customizing the Ribbon&lt;/FONT&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/bb386104.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb386104.aspx"&gt;&lt;FONT face=Corbel size=3&gt;Walkthrough: Creating a Custom Tab by Using the Ribbon Designer&lt;/FONT&gt;&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Corbel size=3&gt;Try it out and let us know what you think!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Corbel size=3&gt;- Kemp Brown &lt;BR&gt;&lt;/FONT&gt;&lt;FONT face=Corbel size=3&gt;&lt;EM&gt;Programming Writer for BizApps User Education&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8059368" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/Kemp+Brown/default.aspx">Kemp Brown</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Ribbon/default.aspx">Ribbon</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VSTO+Power+Tools/default.aspx">VSTO Power Tools</category></item></channel></rss>