<?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 : Word 2007</title><link>http://blogs.msdn.com/vsto/archive/tags/Word+2007/default.aspx</link><description>Tags: Word 2007</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Office Development with Visual Studio 2008 Tutorial Series – Part 2(Beth Massi)</title><link>http://blogs.msdn.com/vsto/archive/2009/12/08/office-development-with-visual-studio-2008-tutorial-series-part-2-beth-massi.aspx</link><pubDate>Tue, 08 Dec 2009 18:36:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9934188</guid><dc:creator>VSTO Team</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9934188.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9934188</wfw:commentRss><description>&lt;p&gt;Last month &lt;a href="https://mvp.support.microsoft.com/profile=169AE602-45EF-47E6-8868-CA3E91D0A1EE"&gt;Robert Green&lt;/a&gt;, VSTO MVP, started a series of tutorials on building on Office 2007. Today we published part 2 of his step-by-step tutorials. &lt;/p&gt;  &lt;p&gt;In this second part of the series of tutorials on Office Business Applications, learn how to create a Word 2007 price quote generation solution using Visual Studio 2008. This tutorial shows you how to create a custom task pane to display data from a database and binding that data to content controls. This step-by-step tutorial also includes full source code in Visual Basic and C#. Check out the tutorial on the &lt;a href="http://msdn.microsoft.com/en-us/vsto/ee620548.aspx"&gt;VSTO Developer Center&lt;/a&gt;: &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/vsto/ee861194.aspx" target="_blank"&gt;Building an Office Business Application Part 2 – Generating Automobile Quotes&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;And if you missed part 1:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/vsto/ee620548.aspx" target="_blank"&gt;Building an Office Business Application Part 1 - Scheduling Customer Appointments&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;If you’re just getting started with Office development in Visual Studio, this is a great place to start.&lt;/p&gt;  &lt;p&gt;Enjoy,   &lt;br /&gt;-&lt;a href="http://blogs.msdn.com/bethmassi" target="_blank"&gt;Beth Massi&lt;/a&gt;, Visual Studio Community&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9934188" 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/Word+2007/default.aspx">Word 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/OBA/default.aspx">OBA</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VS2008/default.aspx">VS2008</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Beth+Massi/default.aspx">Beth Massi</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Community/default.aspx">Community</category></item><item><title>VSTO Bug Tracker (Eric Carter, Beth Massi)</title><link>http://blogs.msdn.com/vsto/archive/2009/05/18/vsto-bug-tracker-eric-carter-beth-massi.aspx</link><pubDate>Mon, 18 May 2009 23:16:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9625928</guid><dc:creator>VSTO Team</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9625928.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9625928</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://blogs.msdn.com/eric_carter/" target="_blank"&gt;Eric Carter&lt;/a&gt; released &lt;a href="http://code.msdn.microsoft.com/VSTOBugTracker" target="_blank"&gt;a sample and series of articles&lt;/a&gt; based on his TechEd demo last week that shows you how to bring bug data from TFS into Excel and Word using VSTO so it can be further analyzed. &lt;/p&gt;  &lt;p&gt;If you you went to TechEd but missed the session you can watch it here if you’ve registered:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.msteched.com/online/view.aspx?tid=2f9f0f7f-f546-4465-a618-744bff15d0b0"&gt;Advanced Microsoft Office Word and Excel 2007 Development in Microsoft Visual Studio 2008 with Visual Studio Tools for Office&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/VSTOBugTracker" target="_blank"&gt;&lt;strong&gt;Everyone can download the sample here.&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And don’t forget to check the &lt;a href="http://msdn.com/vsto" target="_blank"&gt;VSTO Dev Center&lt;/a&gt; often for more news, &lt;a href="http://msdn.microsoft.com/en-us/vsto/dd164305.aspx" target="_blank"&gt;articles&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/vsto/dd164303.aspx" target="_blank"&gt;videos&lt;/a&gt;, and samples.&lt;/p&gt;  &lt;p&gt;Enjoy,   &lt;br /&gt;-&lt;a href="http://blogs.msdn.com/bethmassi" target="_blank"&gt;Beth Massi&lt;/a&gt;, Visual Studio Community&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9625928" 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/Word+2007/default.aspx">Word 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Excel+2007/default.aspx">Excel 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/sample/default.aspx">sample</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VS2008/default.aspx">VS2008</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Beth+Massi/default.aspx">Beth Massi</category></item><item><title>TechEd Sessions on Office Development</title><link>http://blogs.msdn.com/vsto/archive/2009/05/07/teched-sessions-on-office-development.aspx</link><pubDate>Fri, 08 May 2009 00:16:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9594976</guid><dc:creator>VSTO Team</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9594976.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9594976</wfw:commentRss><description>&lt;p&gt;If you’re going to TechEd in Los Angeles next week, then don’t miss these four sessions:&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;b&gt;DTL03-INT Meet the Microsoft Visual Studio Team&lt;/b&gt;     &lt;br /&gt;Christin Boyd, &lt;a href="http://blogs.msdn.com/eric_carter/default.aspx" target="_blank"&gt;Eric Carter&lt;/a&gt;, Paul Yuknewicz, Jay Schmelzer, &lt;a href="http://diditwith.net/" target="_blank"&gt;Dustin Campbell&lt;/a&gt;, Jonathan Aneja, &lt;a href="http://blogs.msdn.com/lukeh/" target="_blank"&gt;Luke Hoban&lt;/a&gt;, Igor Zinkovsky, Faisal Nasir, &lt;a href="http://devhawk.net/" target="_blank"&gt;Harry Pierson&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/vbteam/" target="_blank"&gt;Lisa Feigenbaum&lt;/a&gt;     &lt;br /&gt;Mon 5/11&amp;#160; 2:45 PM-4:00 PM | Blue Theater 1     &lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;OFC325&amp;#160; Building Custom Applications in Microsoft Office Outlook 2007&lt;/strong&gt;     &lt;br /&gt;&lt;a href="http://officedeveloper.net/" target="_blank"&gt;Ty Anderson&lt;/a&gt;, Damon Armstrong     &lt;br /&gt;Tue 5/12&amp;#160; 2:45 PM-4:00 PM | Room 408A&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;DTL324 - Microsoft Visual Studio 2010 Overview for the Business Application Developer &lt;/strong&gt;    &lt;br /&gt;Jay Schmelzer     &lt;br /&gt;Tue 5/12 4:30 PM-5:45 PM | Room 515B&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;OFC324&lt;/b&gt;     &lt;br /&gt;&lt;b&gt;Advanced Microsoft Office Word and Excel 2007 Development in Microsoft Visual Studio 2008 with Visual Studio Tools for Office&lt;/b&gt;     &lt;br /&gt;&lt;a href="http://blogs.msdn.com/eric_carter/default.aspx" target="_blank"&gt;Eric Carter&lt;/a&gt;     &lt;br /&gt;Thursday 5/14 1:00PM-2:15PM | Room 515A&lt;/p&gt;  &lt;p&gt;Of course, there are a dozen other sessions that appeal to Office developers and SharePoint developers.&amp;#160; These are the four that I highly recommend.&amp;#160; Originally I was going to list the 3 not-to-be-missed sessions, but then I couldn’t drop any of these from my list, so we have 4 Must See Sessions!&amp;#160; &lt;/p&gt;  &lt;p&gt;If you’re not going to TechEd, then please click the links on these speakers’ names to read their blogs where the will eventually post some of their demo code.&amp;#160; Expect the posts to happen the Monday after their sessions.&amp;#160; In the case of Eric Carter, he would probably love it if you’d buy his book, &lt;a href="http://www.amazon.com/Visual-Studio-Tools-Office-2007/dp/0321533216" target="_blank"&gt;Visual Studio Tools for Office 2007: VSTO for Excel, Word and Outlook&lt;/a&gt;&lt;u&gt;&lt;/u&gt;.&amp;#160; Or you could just download a zip file with all of the of code from the book &lt;a href="http://blogs.msdn.com/eric_carter/archive/2009/03/14/visual-studio-tools-for-office-2007-code-listings.aspx" target="_blank"&gt;here&lt;/a&gt;.&amp;#160; That should keep you busy for a while.&amp;#160; The explanations in the book really do add to the overall value.&amp;#160; I should credit the co-author, Eric Lippert.&amp;#160; Both men are brilliant and funny, and very modest.&amp;#160; At the Holiday Party this year, Eric Carter got up to sing karaoke and astounded us all with a bouncy rendition of “Sesame Street.” &lt;/p&gt;  &lt;p&gt;-Christin Boyd, Program Manager, Visual Studio&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9594976" 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/Christin+Boyd/default.aspx">Christin Boyd</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/Word+2007/default.aspx">Word 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Excel+2007/default.aspx">Excel 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VB/default.aspx">VB</category><category domain="http://blogs.msdn.com/vsto/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VS2008/default.aspx">VS2008</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Community/default.aspx">Community</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></item><item><title>Test Automation Tips: “User Name” dialog after new install of Word (Christin Boyd, Bill Robertson)</title><link>http://blogs.msdn.com/vsto/archive/2009/05/05/test-automation-tips-user-name-dialog-after-new-install-of-word-christin-boyd-bill-robertson.aspx</link><pubDate>Wed, 06 May 2009 00:12:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9589711</guid><dc:creator>VSTO Team</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9589711.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9589711</wfw:commentRss><description>&lt;p&gt;We have a team of developers who focus entirely on writing test automation programs for the purpose of covering the huge matrix of test cases that Visual Studio requires.&amp;#160; We often configure new installs of Office and our automated tests need to deal with the special things that Office products do when you first run them after a new install.&amp;#160; For example, when you first run Microsoft Word after a new install, it prompts you to enter your name and initials in a dialog that looks like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/TestAutomationTipsUserNamedialogafternew_ABB4/clip_image002_2.jpg"&gt;&lt;img title="clip_image002" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="107" alt="clip_image002" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/TestAutomationTipsUserNamedialogafternew_ABB4/clip_image002_thumb.jpg" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Our talented SDET’s (Software Development Engineer in Test) use the following function in their automated tests to suppress this dialog:&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;div id="codeSnippet" style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;     &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.IO;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Diagnostics;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; AddOffice12UserInfo()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;        {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;            &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; passed = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;            &lt;span style="color: #0000ff"&gt;string&lt;/span&gt;[] commands = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt;[5];&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;            commands[0] = &lt;span style="color: #006080"&gt;@&amp;quot;add HKCU\Software\Microsoft\Office\12.0\Common /v UserData /t REG_DWORD /d 1 /f&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;            commands[1] = &lt;span style="color: #006080"&gt;@&amp;quot;add HKCU\Software\Microsoft\Office\Common\UserInfo /v Company /t REG_SZ /d Microsoft /f&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;            commands[2] = &lt;span style="color: #006080"&gt;@&amp;quot;add HKCU\Software\Microsoft\Office\Common\UserInfo /v UserName /t REG_SZ /d TestRun /f&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;            commands[3] = &lt;span style="color: #006080"&gt;@&amp;quot;add HKCU\Software\Microsoft\Office\Common\UserInfo /v UserInitials /t REG_SZ /d t /f&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;            commands[4] = &lt;span style="color: #006080"&gt;@&amp;quot;add HKCU\Software\Microsoft\Office\12.0\Common\General /v ShownOptIn /t REG_DWORD /d 00000001 /f&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;            &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i = 0; i &amp;lt; commands.Length; i++)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;            {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;                &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; temp = StartREG(commands[i]);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;                &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (!temp)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;                {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;                    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;                }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;            }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;            passed = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; passed;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;        }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; StartREG(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; arguments)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; passed = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; exitcode = -100;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;try&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;    {                &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; localpath = Path.Combine(System.Environment.GetEnvironmentVariable(&lt;span style="color: #006080"&gt;&amp;quot;SYSTEMROOT&amp;quot;&lt;/span&gt;), &lt;span style="color: #006080"&gt;&amp;quot;system32&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;        System.Diagnostics.Process myProcess = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; System.Diagnostics.Process();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;        myProcess.EnableRaisingEvents = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;        myProcess.StartInfo.FileName = Path.Combine(localpath, &lt;span style="color: #006080"&gt;&amp;quot;reg.exe&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;        myProcess.StartInfo.Arguments = arguments;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;        myProcess.StartInfo.UseShellExecute = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;        myProcess.Start();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;        myProcess.WaitForExit();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;        exitcode = myProcess.ExitCode;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (exitcode == 0)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;        {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;            passed = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;        }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;        {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;            &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;            Debug.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;reg exit code is::&amp;quot;&lt;/span&gt; + myProcess.ExitCode.ToString());&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;        }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;        Debug.Fail(ex.Message, ex.StackTrace);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; passed;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Let me know if these Test Automation samples are useful and we will try to publish more of these.&lt;/p&gt;

&lt;p&gt;-Christin Boyd, Program Manager, Visual Studio and Bill Robertson, Software Development Engineer in Test, Visual Studio&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9589711" 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/Christin+Boyd/default.aspx">Christin Boyd</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Dialog+boxes/default.aspx">Dialog boxes</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/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/vsto/archive/tags/sample/default.aspx">sample</category></item><item><title>Clearing Off Custom Menu Items in Word (Norm Estabrook)</title><link>http://blogs.msdn.com/vsto/archive/2009/04/14/clearing-off-custom-menu-items-in-word-norm-estabrook.aspx</link><pubDate>Tue, 14 Apr 2009 21:37:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9548974</guid><dc:creator>VSTO Team</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9548974.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9548974</wfw:commentRss><description>&lt;p&gt;Last month I posted &lt;a href="http://blogs.msdn.com/vsto/archive/2009/03/06/my-word-add-in-creates-duplicate-menu-items-make-it-stop-norm-estabrook.aspx"&gt;this article&lt;/a&gt; that described how to prevent your add-in from creating duplicate menu items in Word.&amp;#160; If you have been experimenting with customization contexts, you might have several menu items that appear when you right click a document. The article that I posted shows how to prevent this from happening for your users, but what about removing the items that appear in your instance of Word – the one that you use for testing? &lt;/p&gt;  &lt;p&gt;To clear those off, just add a bit of code to the startup event handler of any old Word add-in.&amp;#160; Set the customization context to each possible culprit (template, document, attached template etc.) and then call the &lt;strong&gt;Reset&lt;/strong&gt; method. Be sure to save the template or document after words.&amp;#160; &lt;/p&gt;  &lt;p&gt;Note - I wouldn’t recommend that you put this code into an add-in that you send out to users as this code will remove all customizations in each context (Even ones that your add-in has not created!).&amp;#160; However, it is a cool way to clear up left over menu items from the instance of Word that you use for testing.&lt;/p&gt;  &lt;p&gt;&lt;span style="color: blue"&gt;private void &lt;/span&gt;ResetShortcutMenu()     &lt;br /&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; myApplication.CustomizationContext = myApplication.ActiveDocument;     &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; myApplication.CommandBars[&lt;span style="color: #a31515"&gt;&amp;quot;Text&amp;quot;&lt;/span&gt;].Reset();     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; myApplication.ActiveDocument.Save();     &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; myApplication.CustomizationContext = myApplication.ActiveDocument.get_AttachedTemplate();     &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; myApplication.CommandBars[&lt;span style="color: #a31515"&gt;&amp;quot;Text&amp;quot;&lt;/span&gt;].Reset();     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ((Word.&lt;span style="color: #2b91af"&gt;Template&lt;/span&gt;)myApplication.ActiveDocument.get_AttachedTemplate()).Save();     &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; myApplication.CustomizationContext = customTemplate;     &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; myApplication.CommandBars[&lt;span style="color: #a31515"&gt;&amp;quot;Text&amp;quot;&lt;/span&gt;].Reset();     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; customTemplate.Save();     &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; myApplication.CustomizationContext = myApplication.NormalTemplate;     &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; myApplication.CommandBars[&lt;span style="color: #a31515"&gt;&amp;quot;Text&amp;quot;&lt;/span&gt;].Reset();     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; myApplication.NormalTemplate.Save();     &lt;br /&gt;}&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9548974" 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/Office+2007/default.aspx">Office 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+2003/default.aspx">Office 2003</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Word+Object+Model/default.aspx">Word Object Model</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/Word+2003/default.aspx">Word 2003</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></item><item><title>My Word Add-In Creates Duplicate Menu Items. Make it Stop! (Norm Estabrook)</title><link>http://blogs.msdn.com/vsto/archive/2009/03/06/my-word-add-in-creates-duplicate-menu-items-make-it-stop-norm-estabrook.aspx</link><pubDate>Fri, 06 Mar 2009 20:33:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9463406</guid><dc:creator>VSTO Team</dc:creator><slash:comments>13</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9463406.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9463406</wfw:commentRss><description>&lt;p&gt;So I want my add-in to place a custom command into the shortcut menu. The shortcut menu is that cool menu that appears when you right-click a document. Great, so I read some articles in MSDN, write some code, run the add-in and voila there it is! I give it to my buddy, he is proud of my accomplishment and and installs my add-in.&amp;#160; Now he hates me because every time he opens up Word, a duplicate menu appears.&amp;#160; Where did I go wrong? &lt;/p&gt;  &lt;p&gt;Well actually, I didn’t do anything wrong.&amp;#160; It’s just that Word requires a little more attention when it comes to handling menus. I guess you can say that Word is a bit more “needy” than other Office applications. But being “higher maintenance” does not have to mean “higher maintenance costs”.&amp;#160; Hopefully this post will get your friend talking to you again.&lt;/p&gt;  &lt;h3&gt;My code&lt;/h3&gt;  &lt;p&gt;Here is the code that did not work for me.&amp;#160; BTW – I will paste in both &lt;font color="#808080"&gt;Visual Basic&lt;/font&gt; and &lt;font color="#808080"&gt;C#&lt;/font&gt; examples for this post.&lt;/p&gt;  &lt;p&gt;&lt;font color="#808080"&gt;[Visual Basic]&lt;/font&gt;&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Private &lt;/span&gt;MyApplication &lt;span style="color: blue"&gt;As &lt;/span&gt;Word.Application
&lt;span style="color: blue"&gt;Private WithEvents &lt;/span&gt;myControl &lt;span style="color: blue"&gt;As &lt;/span&gt;Office.CommandBarButton

&lt;span style="color: blue"&gt;Private Sub &lt;/span&gt;ThisAddIn_Startup _
(&lt;span style="color: blue"&gt;ByVal &lt;/span&gt;sender &lt;span style="color: blue"&gt;As Object&lt;/span&gt;, &lt;span style="color: blue"&gt;ByVal &lt;/span&gt;e &lt;span style="color: blue"&gt;As &lt;/span&gt;System.EventArgs) &lt;span style="color: blue"&gt;Handles Me&lt;/span&gt;.Startup

    MyApplication = &lt;span style="color: blue"&gt;Me&lt;/span&gt;.Application
    AddMenuItem()

&lt;span style="color: blue"&gt;End Sub

Private Sub &lt;/span&gt;AddMenuItem()

    &lt;span style="color: blue"&gt;Dim &lt;/span&gt;menuItem &lt;span style="color: blue"&gt;As &lt;/span&gt;Office.MsoControlType = _
        Office.MsoControlType.msoControlButton

    myControl = &lt;span style="color: blue"&gt;CType&lt;/span&gt;(MyApplication.CommandBars(&lt;span style="color: #a31515"&gt;&amp;quot;Text&amp;quot;&lt;/span&gt;).Controls.Add _
       (menuItem, 1, &lt;span style="color: blue"&gt;True&lt;/span&gt;), Office.CommandBarButton)

    myControl.Style = Office.MsoButtonStyle.msoButtonCaption
    myControl.Caption = &lt;span style="color: #a31515"&gt;&amp;quot;My Menu Item&amp;quot;
    &lt;/span&gt;myControl.Tag = &lt;span style="color: #a31515"&gt;&amp;quot;MyMenuItem&amp;quot;

&lt;/span&gt;&lt;span style="color: blue"&gt;End Sub


Sub &lt;/span&gt;myControl_Click(&lt;span style="color: blue"&gt;ByVal &lt;/span&gt;Ctrl &lt;span style="color: blue"&gt;As &lt;/span&gt;Microsoft.Office.Core.CommandBarButton, _
                    &lt;span style="color: blue"&gt;ByRef &lt;/span&gt;CancelDefault &lt;span style="color: blue"&gt;As Boolean&lt;/span&gt;) &lt;span style="color: blue"&gt;Handles &lt;/span&gt;myControl.Click

    System.Windows.Forms.MessageBox.Show(&lt;span style="color: #a31515"&gt;&amp;quot;My Menu Item clicked&amp;quot;&lt;/span&gt;)

&lt;span style="color: blue"&gt;End Sub&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;&lt;font color="#808080"&gt;[C#]&lt;/font&gt;&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;private &lt;/span&gt;Word.&lt;span style="color: #2b91af"&gt;Application &lt;/span&gt;myApplication;
&lt;span style="color: blue"&gt;private &lt;/span&gt;Office.&lt;span style="color: #2b91af"&gt;CommandBarButton &lt;/span&gt;myControl;

&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)
{
    myApplication = &lt;span style="color: blue"&gt;this&lt;/span&gt;.Application;
    AddMenuItem(); 
}
 
&lt;span style="color: blue"&gt;private void &lt;/span&gt;AddMenuItem()
{
   Office.&lt;span style="color: #2b91af"&gt;MsoControlType &lt;/span&gt;menuItem = 
        Office.&lt;span style="color: #2b91af"&gt;MsoControlType&lt;/span&gt;.msoControlButton;

    myControl = 
        (Office.&lt;span style="color: #2b91af"&gt;CommandBarButton&lt;/span&gt;)myApplication.CommandBars[&lt;span style="color: #a31515"&gt;&amp;quot;Text&amp;quot;&lt;/span&gt;].Controls.Add
        (menuItem,missing, missing, 1, &lt;span style="color: blue"&gt;true&lt;/span&gt;);

    myControl.Style = Office.&lt;span style="color: #2b91af"&gt;MsoButtonStyle&lt;/span&gt;.msoButtonCaption;
    myControl.Caption = &lt;span style="color: #a31515"&gt;&amp;quot;My Menu Item&amp;quot;&lt;/span&gt;;
    myControl.Tag = &lt;span style="color: #a31515"&gt;&amp;quot;MyMenuItem&amp;quot;&lt;/span&gt;;

    myControl.Click += 
        &lt;span style="color: blue"&gt;new &lt;/span&gt;Microsoft.Office.Core.&lt;span style="color: #2b91af"&gt;_CommandBarButtonEvents_ClickEventHandler
            &lt;/span&gt;(myControl_Click);

}

&lt;span style="color: blue"&gt;void &lt;/span&gt;myControl_Click(Microsoft.Office.Core.&lt;span style="color: #2b91af"&gt;CommandBarButton &lt;/span&gt;Ctrl, 
    &lt;span style="color: blue"&gt;ref bool &lt;/span&gt;CancelDefault)
{
    System.Windows.Forms.&lt;span style="color: #2b91af"&gt;MessageBox&lt;/span&gt;.Show(&lt;span style="color: #a31515"&gt;&amp;quot;My Menu Item clicked&amp;quot;&lt;/span&gt;);
}&lt;/pre&gt;

&lt;h3&gt;Why my code does not work as expected&lt;/h3&gt;

&lt;p&gt;Here is one issue I can see right off the bat. Note this line of code for adding a control:&lt;/p&gt;

&lt;p&gt;myControl = &lt;span style="color: blue"&gt;CType&lt;/span&gt;(MyApplication.CommandBars(&lt;span style="color: #a31515"&gt;&amp;quot;Text&amp;quot;&lt;/span&gt;).Controls.Add _ (menuItem, 1, &lt;span style="color: blue"&gt;True&lt;/span&gt;), Office.CommandBarButton) &lt;/p&gt;

&lt;p&gt;I set the last parameter of the &lt;strong&gt;Add &lt;/strong&gt;method to &lt;strong&gt;True&lt;/strong&gt;.&amp;#160; This value specifies that I want my control to be temporary. I am trying to tell Word &lt;strong&gt;not&lt;/strong&gt; to save the control so that duplicate menu items won’t be added every time Word opens.&amp;#160; Only there is a problem here.&amp;#160; Word &lt;strong&gt;ignores&lt;/strong&gt; this parameter (at least for controls in a CommandBar collection anyway). So I can keep it set to &lt;strong&gt;true&lt;/strong&gt;, but it really means &lt;strong&gt;false&lt;/strong&gt;. Lovely.&lt;/p&gt;

&lt;p&gt;So what is happening? Well, Word is actually saving your new menu command to the Normal.dot template every time a new instance of Word opens – hence the duplicates.&lt;/p&gt;

&lt;h3&gt;What can I do about this?&lt;/h3&gt;

&lt;p&gt;There are probably a billion creative ways to stop the duplicate menus from appearing, but here are &lt;u&gt;three&lt;/u&gt; tips that work really well. Here they are:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Check for duplicates &lt;strong&gt;before &lt;/strong&gt;adding an item (control) to a menu. &lt;/li&gt;

  &lt;li&gt;&lt;strong&gt;Always&lt;/strong&gt; set the customization context of the application to the same document or template before adding or deleting a control. &lt;/li&gt;

  &lt;li&gt;Because there are no temporary commands in Word, &lt;strong&gt;use a custom template&lt;/strong&gt; to save the commands. &lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Tip # 1: Check for Duplicates:&lt;/h4&gt;

&lt;p&gt;This one is pretty easy.&amp;#160; Just add code to your add-in that looks for a control that has the same &lt;strong&gt;tag&lt;/strong&gt; as the control you are about to add.&amp;#160; If one exists, perform one of the following actions:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Don’t add the control (It is already there). &lt;/li&gt;

  &lt;li&gt;Delete the control. Then you can add it. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I modified my code to &lt;strong&gt;delete&lt;/strong&gt; the control. Here is my code.&lt;/p&gt;

&lt;p&gt;&lt;font color="#808080"&gt;[Visual Basic]&lt;/font&gt;&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Private Sub &lt;/span&gt;RemoveExistingMenuItem()

    &lt;span style="color: blue"&gt;Dim &lt;/span&gt;contextMenu &lt;span style="color: blue"&gt;As &lt;/span&gt;Office.CommandBar = _
    MyApplication.CommandBars(&lt;span style="color: #a31515"&gt;&amp;quot;Text&amp;quot;&lt;/span&gt;)

    MyApplication.CustomizationContext = customTemplate

    &lt;span style="color: blue"&gt;Dim &lt;/span&gt;control &lt;span style="color: blue"&gt;As &lt;/span&gt;Office.CommandBarButton = contextMenu.FindControl _
        (Office.MsoControlType.msoControlButton, System.Type.Missing, _
         &lt;span style="color: #a31515"&gt;&amp;quot;MyMenuItem&amp;quot;&lt;/span&gt;, &lt;span style="color: blue"&gt;True&lt;/span&gt;, &lt;span style="color: blue"&gt;True&lt;/span&gt;)

    &lt;span style="color: blue"&gt;If Not &lt;/span&gt;(control &lt;span style="color: blue"&gt;Is Nothing&lt;/span&gt;) &lt;span style="color: blue"&gt;Then
        &lt;/span&gt;control.Delete(&lt;span style="color: blue"&gt;True&lt;/span&gt;)
    &lt;span style="color: blue"&gt;End If

End Sub&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;&lt;font color="#808080"&gt;[C#]&lt;/font&gt;&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;private void &lt;/span&gt;RemoveExistingMenuItem()
{
    Office.&lt;span style="color: #2b91af"&gt;CommandBar &lt;/span&gt;contextMenu = myApplication.CommandBars[&lt;span style="color: #a31515"&gt;&amp;quot;Text&amp;quot;&lt;/span&gt;];
    myApplication.CustomizationContext = customTemplate;

    Office.&lt;span style="color: #2b91af"&gt;CommandBarButton &lt;/span&gt;control = 
        (Office.&lt;span style="color: #2b91af"&gt;CommandBarButton&lt;/span&gt;)contextMenu.FindControl
        (Office.&lt;span style="color: #2b91af"&gt;MsoControlType&lt;/span&gt;.msoControlButton, missing,
        &lt;span style="color: #a31515"&gt;&amp;quot;MyMenuItem&amp;quot;&lt;/span&gt;, &lt;span style="color: blue"&gt;true&lt;/span&gt;, &lt;span style="color: blue"&gt;true&lt;/span&gt;);

    &lt;span style="color: blue"&gt;if &lt;/span&gt;((control != &lt;span style="color: blue"&gt;null&lt;/span&gt;))
    {
        control.Delete(&lt;span style="color: blue"&gt;true&lt;/span&gt;);
    }

}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;h4&gt;Tip #2: Set the Customization Context&lt;/h4&gt;

&lt;p&gt;The customization context of the application tells Word where to save your customizations. To specify the customization context, set the &lt;a href="http://msdn.microsoft.com/en-us/library/aa205536(office.10).aspx"&gt;CustomizationContext&lt;/a&gt; property of the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word._application(VS.80).aspx"&gt;Application&lt;/a&gt; object.&lt;/p&gt;

&lt;p&gt;By default, Word uses the &lt;strong&gt;Normal.dot&lt;/strong&gt; template as it’s customization context.&amp;#160; This is not reliable and can change. If you do not explicitly set the context, you might search for controls saved to one context such as a document, delete controls from another context such as a custom template and then add the control to another context such as Normal.dot.&lt;/p&gt;

&lt;p&gt;To avoid these issues, &lt;strong&gt;always &lt;/strong&gt;set the customization context of the application to the same document or template every time you search for, delete, or add controls to a menu.&lt;/p&gt;

&lt;p&gt;Note that in a Word document-level customization, it is probably best to set the customization context to the active document.&amp;#160; That way when the user uninstalls the customization, the document and the menu commands that pertain to that document disappear as expected.&lt;/p&gt;

&lt;p&gt;In Word application-level add-in, the best practice is to use a &lt;strong&gt;custom template&lt;/strong&gt; for reasons mentioned later on in this post.&lt;/p&gt;

&lt;p&gt;In the following example, I highlighted in bold the line that sets the customization context.&amp;#160; Further along in this post, I will show you where I got &lt;strong&gt;customTemplate&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;font color="#808080"&gt;[Visual Basic]&lt;/font&gt;&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Private Sub &lt;/span&gt;AddMenuItem()

&lt;strong&gt;    &lt;font size="4"&gt;MyApplication.CustomizationContext = customTemplate&lt;/font&gt;&lt;/strong&gt;

    &lt;span style="color: blue"&gt;Dim &lt;/span&gt;menuItem &lt;span style="color: blue"&gt;As &lt;/span&gt;Office.MsoControlType = _
        Office.MsoControlType.msoControlButton

    myControl = &lt;span style="color: blue"&gt;CType&lt;/span&gt;(MyApplication.CommandBars(&lt;span style="color: #a31515"&gt;&amp;quot;Text&amp;quot;&lt;/span&gt;).Controls.Add _
       (menuItem, 1, &lt;span style="color: blue"&gt;True&lt;/span&gt;), Office.CommandBarButton)

    myControl.Style = Office.MsoButtonStyle.msoButtonCaption
    myControl.Caption = &lt;span style="color: #a31515"&gt;&amp;quot;My Menu Item&amp;quot;
    &lt;/span&gt;myControl.Tag = &lt;span style="color: #a31515"&gt;&amp;quot;MyMenuItem&amp;quot;
    &lt;/span&gt;customTemplate.Saved = &lt;span style="color: blue"&gt;True
&lt;/span&gt;&lt;/pre&gt;

&lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;    GC&lt;/span&gt;.Collect()
&lt;span style="color: blue"&gt;
End Sub&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&lt;font color="#808080"&gt;[C#]&lt;/font&gt;&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;private void &lt;/span&gt;AddMenuItem()
{
    &lt;font size="4"&gt;&lt;strong&gt;myApplication.CustomizationContext = customTemplate;&lt;/strong&gt;&lt;/font&gt;
    Office.&lt;span style="color: #2b91af"&gt;MsoControlType &lt;/span&gt;menuItem = 
        Office.&lt;span style="color: #2b91af"&gt;MsoControlType&lt;/span&gt;.msoControlButton;

    myControl = 
        (Office.&lt;span style="color: #2b91af"&gt;CommandBarButton&lt;/span&gt;)myApplication.CommandBars[&lt;span style="color: #a31515"&gt;&amp;quot;Text&amp;quot;&lt;/span&gt;].Controls.Add
        (menuItem,missing, missing, 1, &lt;span style="color: blue"&gt;true&lt;/span&gt;);

    myControl.Style = Office.&lt;span style="color: #2b91af"&gt;MsoButtonStyle&lt;/span&gt;.msoButtonCaption;
    myControl.Caption = &lt;span style="color: #a31515"&gt;&amp;quot;My Menu Item&amp;quot;&lt;/span&gt;;
    myControl.Tag = &lt;span style="color: #a31515"&gt;&amp;quot;MyMenuItem&amp;quot;&lt;/span&gt;;

    myControl.Click += 
        &lt;span style="color: blue"&gt;new &lt;/span&gt;Microsoft.Office.Core.&lt;span style="color: #2b91af"&gt;_CommandBarButtonEvents_ClickEventHandler
            &lt;/span&gt;(myControl_Click);

    customTemplate.Saved = &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;/pre&gt;

&lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;    GC&lt;/span&gt;.Collect();&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;pre class="code"&gt;}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;&lt;strong&gt;Also – a quick tip&lt;/strong&gt; – set the &lt;strong&gt;Saved&lt;/strong&gt; property of the template to &lt;strong&gt;true &lt;/strong&gt;after you add the control.&amp;#160; This stops that annoying prompt from appearing that asks if you would like to save your customizations to the template.&lt;/p&gt;

&lt;h4&gt;Tip #3: Use a Custom Template&lt;/h4&gt;

&lt;p&gt;It is very difficult to delete a control &lt;strong&gt;before&lt;/strong&gt; the add-in shuts down.&amp;#160; For example, if you attempt to delete a control in the &lt;strong&gt;ThisAddIn_Shutdown&lt;/strong&gt; event handler, you will receive a not so helpful COM exception.&amp;#160; You will get similar results in the &lt;strong&gt;Quit&lt;/strong&gt; event of Word.&amp;#160; &lt;/p&gt;

&lt;p&gt;That is because the template that you are using as your application’s customization context is not writable in either of those event handlers.&amp;#160; So if you cannot easily delete the control when Word closes, that means that the control will always live inside of the template.&lt;/p&gt;

&lt;p&gt;This is a problem if you are using Normal.dot to persist the controls.&amp;#160; Here is why.&amp;#160; Let’s say the user decides that he does not want to see your command in a menu anymore.&amp;#160; With a caption such as “My Menu Item”, can you really blame him? So the user uninstalls your add-in. However, the menu command still lives in Normal.dot! When that user opens his document in Word, &amp;quot;My Menu Item” still appears. Doooh! Here comes the support calls!&lt;/p&gt;

&lt;p&gt;The way around this is to provide your own custom template to store customizations such as custom menus and menu items.&amp;#160; Your setup application can remove the template along with add-in. That way when the user uninstalls the add-in, they also remove the template that contains the menu items. &lt;/p&gt;

&lt;p&gt;In the following example, I retrieve a custom template from the users documents folder. Yes, your setup application will probably use a different location to place the custom template, but this is just for an example.&lt;/p&gt;

&lt;p&gt;&lt;font color="#808080"&gt;[Visual Basic]&lt;/font&gt;&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Private Sub &lt;/span&gt;GetCustomTemplate()&lt;/pre&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;    Dim &lt;/span&gt;TemplatePath &lt;span style="color: blue"&gt;As String &lt;/span&gt;= &lt;span style="color: #2b91af"&gt;Environment&lt;/span&gt;.GetFolderPath _
        (&lt;span style="color: #2b91af"&gt;Environment&lt;/span&gt;.&lt;span style="color: #2b91af"&gt;SpecialFolder&lt;/span&gt;.MyDocuments) + &lt;span style="color: #a31515"&gt;&amp;quot;\MyCustomTemplate.dotx&amp;quot;
&lt;/span&gt;&lt;span style="color: blue"&gt;    Dim &lt;/span&gt;install &lt;span style="color: blue"&gt;As Boolean &lt;/span&gt;= &lt;span style="color: blue"&gt;True

    For Each &lt;/span&gt;installedTemplate &lt;span style="color: blue"&gt;As &lt;/span&gt;Word.&lt;span style="color: #2b91af"&gt;Template &lt;/span&gt;&lt;span style="color: blue"&gt;In &lt;/span&gt;MyApplication.Templates
        &lt;span style="color: blue"&gt;If &lt;/span&gt;installedTemplate.FullName = &lt;span style="color: blue"&gt;DirectCast&lt;/span&gt;(TemplatePath, &lt;span style="color: blue"&gt;String&lt;/span&gt;) &lt;span style="color: blue"&gt;Then
            &lt;/span&gt;install = &lt;span style="color: blue"&gt;False
&lt;/span&gt;        &lt;span style="color: blue"&gt;End If
    Next

    If &lt;/span&gt;install = &lt;span style="color: blue"&gt;True Then
        &lt;/span&gt;MyApplication.AddIns.Add(TemplatePath.ToString(), &lt;span style="color: blue"&gt;True&lt;/span&gt;)
&lt;span style="color: blue"&gt;    End If

&lt;/span&gt;    customTemplate = MyApplication.Templates(TemplatePath)&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;End Sub&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;&lt;font color="#808080"&gt;[C#]&lt;/font&gt;&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;private void &lt;/span&gt;GetCustomTemplate()
{
    &lt;span style="color: blue"&gt;object &lt;/span&gt;TemplatePath = &lt;span style="color: #2b91af"&gt;Environment&lt;/span&gt;.GetFolderPath
        (&lt;span style="color: #2b91af"&gt;Environment&lt;/span&gt;.&lt;span style="color: #2b91af"&gt;SpecialFolder&lt;/span&gt;.MyDocuments) +
        &lt;span style="color: #a31515"&gt;&amp;quot;\\MyCustomTemplate.dotx&amp;quot;&lt;/span&gt;;
    &lt;span style="color: blue"&gt;object &lt;/span&gt;install = &lt;span style="color: blue"&gt;true&lt;/span&gt;;
    &lt;/pre&gt;

&lt;pre class="code"&gt;    &lt;span style="color: blue"&gt;foreach &lt;/span&gt;(Word.&lt;span style="color: #2b91af"&gt;Template &lt;/span&gt;installedTemplate &lt;span style="color: blue"&gt;in &lt;/span&gt;myApplication.Templates)
    {
        &lt;span style="color: blue"&gt;if &lt;/span&gt;(installedTemplate.FullName == (&lt;span style="color: blue"&gt;string&lt;/span&gt;)TemplatePath)
        {
            install = &lt;span style="color: blue"&gt;false&lt;/span&gt;;
        }
    }
    &lt;span style="color: blue"&gt;if &lt;/span&gt;((&lt;span style="color: blue"&gt;bool&lt;/span&gt;)install)
    {
        myApplication.AddIns.Add(TemplatePath.ToString(), &lt;span style="color: blue"&gt;ref &lt;/span&gt;install);
    }
    customTemplate = myApplication.Templates.get_Item(&lt;span style="color: blue"&gt;ref &lt;/span&gt;TemplatePath);

}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;h4&gt;&lt;font color="#808080"&gt;&lt;font color="#000000"&gt;Drum roll please .. I present the complete example&lt;/font&gt;&lt;/font&gt;&lt;/h4&gt;

&lt;p&gt;To provide context, here is the complete sample:&lt;/p&gt;

&lt;p&gt;&lt;font color="#808080"&gt;[Visual Basic]&lt;/font&gt;&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Public Class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ThisAddIn

    &lt;/span&gt;&lt;span style="color: blue"&gt;Private &lt;/span&gt;MyApplication &lt;span style="color: blue"&gt;As &lt;/span&gt;Word.Application
    &lt;span style="color: blue"&gt;Private WithEvents &lt;/span&gt;myControl &lt;span style="color: blue"&gt;As &lt;/span&gt;Office.&lt;span style="color: #2b91af"&gt;CommandBarButton
    &lt;/span&gt;&lt;span style="color: blue"&gt;Private &lt;/span&gt;customTemplate &lt;span style="color: blue"&gt;As &lt;/span&gt;Word.&lt;span style="color: #2b91af"&gt;Template

    &lt;/span&gt;&lt;span style="color: blue"&gt;Private Sub &lt;/span&gt;ThisAddIn_Startup _
    (&lt;span style="color: blue"&gt;ByVal &lt;/span&gt;sender &lt;span style="color: blue"&gt;As Object&lt;/span&gt;, &lt;span style="color: blue"&gt;ByVal &lt;/span&gt;e &lt;span style="color: blue"&gt;As &lt;/span&gt;System.&lt;span style="color: #2b91af"&gt;EventArgs&lt;/span&gt;) &lt;span style="color: blue"&gt;Handles Me&lt;/span&gt;.Startup

        MyApplication = &lt;span style="color: blue"&gt;Me&lt;/span&gt;.Application

        GetCustomTemplate()
        RemoveExistingMenuItem()
        AddMenuItem()

    &lt;span style="color: blue"&gt;End Sub

    Private Sub &lt;/span&gt;GetCustomTemplate()
        &lt;span style="color: blue"&gt;Dim &lt;/span&gt;TemplatePath &lt;span style="color: blue"&gt;As String &lt;/span&gt;= &lt;span style="color: #2b91af"&gt;Environment&lt;/span&gt;.GetFolderPath _
            (&lt;span style="color: #2b91af"&gt;Environment&lt;/span&gt;.&lt;span style="color: #2b91af"&gt;SpecialFolder&lt;/span&gt;.MyDocuments) + &lt;span style="color: #a31515"&gt;&amp;quot;\MyCustomTemplate.dotx&amp;quot;
        &lt;/span&gt;&lt;span style="color: blue"&gt;Dim &lt;/span&gt;install &lt;span style="color: blue"&gt;As Boolean &lt;/span&gt;= &lt;span style="color: blue"&gt;True

        For Each &lt;/span&gt;installedTemplate &lt;span style="color: blue"&gt;As &lt;/span&gt;Word.&lt;span style="color: #2b91af"&gt;Template &lt;/span&gt;&lt;span style="color: blue"&gt;In &lt;/span&gt;MyApplication.Templates
            &lt;span style="color: blue"&gt;If &lt;/span&gt;installedTemplate.FullName = &lt;span style="color: blue"&gt;DirectCast&lt;/span&gt;(TemplatePath, &lt;span style="color: blue"&gt;String&lt;/span&gt;) &lt;span style="color: blue"&gt;Then
                &lt;/span&gt;install = &lt;span style="color: blue"&gt;False
            End If
        Next

        If &lt;/span&gt;install = &lt;span style="color: blue"&gt;True Then
            &lt;/span&gt;MyApplication.AddIns.Add(TemplatePath.ToString(), &lt;span style="color: blue"&gt;True&lt;/span&gt;)
        &lt;span style="color: blue"&gt;End If

        &lt;/span&gt;customTemplate = MyApplication.Templates(TemplatePath)

    &lt;span style="color: blue"&gt;End Sub

    Private Sub &lt;/span&gt;RemoveExistingMenuItem()

        &lt;span style="color: blue"&gt;Dim &lt;/span&gt;contextMenu &lt;span style="color: blue"&gt;As &lt;/span&gt;Office.&lt;span style="color: #2b91af"&gt;CommandBar &lt;/span&gt;= _
        MyApplication.CommandBars(&lt;span style="color: #a31515"&gt;&amp;quot;Text&amp;quot;&lt;/span&gt;)

        MyApplication.CustomizationContext = customTemplate

        &lt;span style="color: blue"&gt;Dim &lt;/span&gt;control &lt;span style="color: blue"&gt;As &lt;/span&gt;Office.&lt;span style="color: #2b91af"&gt;CommandBarButton &lt;/span&gt;= contextMenu.FindControl _
            (Office.&lt;span style="color: #2b91af"&gt;MsoControlType&lt;/span&gt;.msoControlButton, System.&lt;span style="color: #2b91af"&gt;Type&lt;/span&gt;.Missing, _
             &lt;span style="color: #a31515"&gt;&amp;quot;MyMenuItem&amp;quot;&lt;/span&gt;, &lt;span style="color: blue"&gt;True&lt;/span&gt;, &lt;span style="color: blue"&gt;True&lt;/span&gt;)

        &lt;span style="color: blue"&gt;If Not &lt;/span&gt;(control &lt;span style="color: blue"&gt;Is Nothing&lt;/span&gt;) &lt;span style="color: blue"&gt;Then
            &lt;/span&gt;control.Delete(&lt;span style="color: blue"&gt;True&lt;/span&gt;)
        &lt;span style="color: blue"&gt;End If

    End Sub


    Private Sub &lt;/span&gt;AddMenuItem()

        MyApplication.CustomizationContext = customTemplate

        &lt;span style="color: blue"&gt;Dim &lt;/span&gt;menuItem &lt;span style="color: blue"&gt;As &lt;/span&gt;Office.&lt;span style="color: #2b91af"&gt;MsoControlType &lt;/span&gt;= _
            Office.&lt;span style="color: #2b91af"&gt;MsoControlType&lt;/span&gt;.msoControlButton

        myControl = &lt;span style="color: blue"&gt;CType&lt;/span&gt;(MyApplication.CommandBars(&lt;span style="color: #a31515"&gt;&amp;quot;Text&amp;quot;&lt;/span&gt;).Controls.Add _
           (menuItem, 1, &lt;span style="color: blue"&gt;True&lt;/span&gt;), Office.&lt;span style="color: #2b91af"&gt;CommandBarButton&lt;/span&gt;)

        myControl.Style = Office.&lt;span style="color: #2b91af"&gt;MsoButtonStyle&lt;/span&gt;.msoButtonCaption
        myControl.Caption = &lt;span style="color: #a31515"&gt;&amp;quot;My Menu Item&amp;quot;
        &lt;/span&gt;myControl.Tag = &lt;span style="color: #a31515"&gt;&amp;quot;MyMenuItem&amp;quot;
        &lt;/span&gt;customTemplate.Saved = &lt;span style="color: blue"&gt;True

        &lt;/span&gt;&lt;span style="color: #2b91af"&gt;GC&lt;/span&gt;.Collect()

    &lt;span style="color: blue"&gt;End Sub

    Sub &lt;/span&gt;myControl_Click(&lt;span style="color: blue"&gt;ByVal &lt;/span&gt;Ctrl &lt;span style="color: blue"&gt;As &lt;/span&gt;Microsoft.Office.Core.&lt;span style="color: #2b91af"&gt;CommandBarButton&lt;/span&gt;, _
                        &lt;span style="color: blue"&gt;ByRef &lt;/span&gt;CancelDefault &lt;span style="color: blue"&gt;As Boolean&lt;/span&gt;) &lt;span style="color: blue"&gt;Handles &lt;/span&gt;myControl.Click

        System.Windows.Forms.&lt;span style="color: #2b91af"&gt;MessageBox&lt;/span&gt;.Show(&lt;span style="color: #a31515"&gt;&amp;quot;My Menu Item clicked&amp;quot;&lt;/span&gt;)

    &lt;span style="color: blue"&gt;End Sub

    Private Sub &lt;/span&gt;ThisAddIn_Shutdown() &lt;span style="color: blue"&gt;Handles Me&lt;/span&gt;.Shutdown

    &lt;span style="color: blue"&gt;End Sub

End Class
&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;&lt;font color="#808080"&gt;[C#]&lt;/font&gt;&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public partial class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ThisAddIn
&lt;/span&gt;{
    &lt;span style="color: blue"&gt;private &lt;/span&gt;Word.&lt;span style="color: #2b91af"&gt;Application &lt;/span&gt;myApplication;
    &lt;span style="color: blue"&gt;private &lt;/span&gt;Office.&lt;span style="color: #2b91af"&gt;CommandBarButton &lt;/span&gt;myControl;
    &lt;span style="color: blue"&gt;private &lt;/span&gt;Word.&lt;span style="color: #2b91af"&gt;Template &lt;/span&gt;customTemplate;

    &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)
    {
        myApplication = &lt;span style="color: blue"&gt;this&lt;/span&gt;.Application;

        GetCustomTemplate();
        RemoveExistingMenuItem();
        AddMenuItem();
    }

    &lt;span style="color: blue"&gt;private void &lt;/span&gt;GetCustomTemplate()
    {
        &lt;span style="color: blue"&gt;object &lt;/span&gt;TemplatePath = &lt;span style="color: #2b91af"&gt;Environment&lt;/span&gt;.GetFolderPath
            (&lt;span style="color: #2b91af"&gt;Environment&lt;/span&gt;.&lt;span style="color: #2b91af"&gt;SpecialFolder&lt;/span&gt;.MyDocuments) +
            &lt;span style="color: #a31515"&gt;&amp;quot;\\MyCustomTemplate.dotx&amp;quot;&lt;/span&gt;;
        &lt;span style="color: blue"&gt;object &lt;/span&gt;install = &lt;span style="color: blue"&gt;true&lt;/span&gt;;
        &lt;span style="color: blue"&gt;foreach &lt;/span&gt;(Word.&lt;span style="color: #2b91af"&gt;Template &lt;/span&gt;installedTemplate &lt;span style="color: blue"&gt;in &lt;/span&gt;myApplication.Templates)
        {
            &lt;span style="color: blue"&gt;if &lt;/span&gt;(installedTemplate.FullName == (&lt;span style="color: blue"&gt;string&lt;/span&gt;)TemplatePath)
            {
                install = &lt;span style="color: blue"&gt;false&lt;/span&gt;;
            }
        }
        &lt;span style="color: blue"&gt;if &lt;/span&gt;((&lt;span style="color: blue"&gt;bool&lt;/span&gt;)install)
        {
            myApplication.AddIns.Add(TemplatePath.ToString(), &lt;span style="color: blue"&gt;ref &lt;/span&gt;install);
        }
        customTemplate = myApplication.Templates.get_Item(&lt;span style="color: blue"&gt;ref &lt;/span&gt;TemplatePath);

    }

    &lt;span style="color: blue"&gt;private void &lt;/span&gt;RemoveExistingMenuItem()
    {
        Office.&lt;span style="color: #2b91af"&gt;CommandBar &lt;/span&gt;contextMenu = myApplication.CommandBars[&lt;span style="color: #a31515"&gt;&amp;quot;Text&amp;quot;&lt;/span&gt;];
        myApplication.CustomizationContext = customTemplate;

        Office.&lt;span style="color: #2b91af"&gt;CommandBarButton &lt;/span&gt;control =
            (Office.&lt;span style="color: #2b91af"&gt;CommandBarButton&lt;/span&gt;)contextMenu.FindControl
            (Office.&lt;span style="color: #2b91af"&gt;MsoControlType&lt;/span&gt;.msoControlButton, missing,
            &lt;span style="color: #a31515"&gt;&amp;quot;MyMenuItem&amp;quot;&lt;/span&gt;, &lt;span style="color: blue"&gt;true&lt;/span&gt;, &lt;span style="color: blue"&gt;true&lt;/span&gt;);

        &lt;span style="color: blue"&gt;if &lt;/span&gt;((control != &lt;span style="color: blue"&gt;null&lt;/span&gt;))
        {
            control.Delete(&lt;span style="color: blue"&gt;true&lt;/span&gt;);
        }

    }

    &lt;span style="color: blue"&gt;private void &lt;/span&gt;AddMenuItem()
    {
        myApplication.CustomizationContext = customTemplate;
        Office.&lt;span style="color: #2b91af"&gt;MsoControlType &lt;/span&gt;menuItem =
            Office.&lt;span style="color: #2b91af"&gt;MsoControlType&lt;/span&gt;.msoControlButton;

        myControl =
            (Office.&lt;span style="color: #2b91af"&gt;CommandBarButton&lt;/span&gt;)myApplication.CommandBars[&lt;span style="color: #a31515"&gt;&amp;quot;Text&amp;quot;&lt;/span&gt;].Controls.Add
            (menuItem, missing, missing, 1, &lt;span style="color: blue"&gt;true&lt;/span&gt;);

        myControl.Style = Office.&lt;span style="color: #2b91af"&gt;MsoButtonStyle&lt;/span&gt;.msoButtonCaption;
        myControl.Caption = &lt;span style="color: #a31515"&gt;&amp;quot;My Menu Item&amp;quot;&lt;/span&gt;;
        myControl.Tag = &lt;span style="color: #a31515"&gt;&amp;quot;MyMenuItem&amp;quot;&lt;/span&gt;;

        myControl.Click +=
            &lt;span style="color: blue"&gt;new &lt;/span&gt;Microsoft.Office.Core.&lt;span style="color: #2b91af"&gt;_CommandBarButtonEvents_ClickEventHandler
                &lt;/span&gt;(myControl_Click);

        customTemplate.Saved = &lt;span style="color: blue"&gt;true&lt;/span&gt;;

        &lt;span style="color: #2b91af"&gt;GC&lt;/span&gt;.Collect();

    }

    &lt;span style="color: blue"&gt;void &lt;/span&gt;myControl_Click(Microsoft.Office.Core.&lt;span style="color: #2b91af"&gt;CommandBarButton &lt;/span&gt;Ctrl,
        &lt;span style="color: blue"&gt;ref bool &lt;/span&gt;CancelDefault)
    {
        System.Windows.Forms.&lt;span style="color: #2b91af"&gt;MessageBox&lt;/span&gt;.Show(&lt;span style="color: #a31515"&gt;&amp;quot;My Menu Item clicked&amp;quot;&lt;/span&gt;);
    }
    &lt;span style="color: blue"&gt;private void &lt;/span&gt;ThisAddIn_Shutdown(&lt;span style="color: blue"&gt;object &lt;/span&gt;sender, System.&lt;span style="color: #2b91af"&gt;EventArgs &lt;/span&gt;e)
    {
    }
}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;Now you can issue a patch to your buddy so that he has only one “My Menu Item” appearing in his shortcut menu.&amp;#160; Although .. I am not sure what “My Menu Item” is really suppose to do … 

&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9463406" width="1" height="1"&gt;</description><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/Command+bars/default.aspx">Command bars</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/Office+2003/default.aspx">Office 2003</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/Word+2003/default.aspx">Word 2003</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+14/default.aspx">Office 14</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+2010/default.aspx">Office 2010</category></item><item><title>New "How Do I" Video on Creating Smart Tags in Word (Beth Massi)</title><link>http://blogs.msdn.com/vsto/archive/2008/12/18/new-how-do-i-video-on-creating-smart-tags-in-word-beth-massi.aspx</link><pubDate>Thu, 18 Dec 2008 20:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9232517</guid><dc:creator>VSTO Team</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9232517.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9232517</wfw:commentRss><description>&lt;P&gt;Our very own &lt;A href="http://blogs.msdn.com/vsto/archive/tags/Mary+Lee/default.aspx" target=_blank mce_href="http://blogs.msdn.com/vsto/archive/tags/Mary+Lee/default.aspx"&gt;Mary Lee&lt;/A&gt; has &lt;A href="http://msdn.microsoft.com/en-us/vsto/dd347826.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/vsto/dd347826.aspx"&gt;got a new video&lt;/A&gt; up on the &lt;A href="http://msdn.com/vsto" target=_blank mce_href="http://msdn.com/vsto"&gt;Dev Center&lt;/A&gt; on programming smart tags in with custom recognizers in Word using &lt;A href="http://msdn.microsoft.com/en-us/vstudio/products/cc533448.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/vstudio/products/cc533448.aspx"&gt;Visual Studio 2008 Service Pack 1&lt;/A&gt;. This is a video version of the &lt;A href="http://msdn.microsoft.com/en-us/library/ms268751.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/ms268751.aspx"&gt;How To topic in the MSDN library&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/vsto/dd347826.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/vsto/dd347826.aspx"&gt;&lt;STRONG&gt;Watch or download the video here.&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Thanks Mary!&lt;/P&gt;
&lt;P&gt;Enjoy,&lt;BR&gt;-&lt;A href="http://blogs.msdn.com/bethmassi" target=_blank mce_href="http://blogs.msdn.com/bethmassi"&gt;Beth Massi&lt;/A&gt;, Visual Studio Community&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9232517" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/Mary+Lee/default.aspx">Mary Lee</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/smart+tags/default.aspx">smart tags</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VB/default.aspx">VB</category><category domain="http://blogs.msdn.com/vsto/archive/tags/video/default.aspx">video</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Beth+Massi/default.aspx">Beth Massi</category></item><item><title>Why Can’t I Change the Update Path when Redeploying VSTO Solutions? (Christin Boyd, Kris Makey, Jeff Young)</title><link>http://blogs.msdn.com/vsto/archive/2008/12/16/why-can-t-i-change-the-update-path-when-redeploying-vsto-solutions-christin-boyd-kris-makey-jeff-young.aspx</link><pubDate>Wed, 17 Dec 2008 01:45:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9228873</guid><dc:creator>VSTO Team</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9228873.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9228873</wfw:commentRss><description>&lt;p&gt;The other day I was asked about the automatic Updates feature of VSTO 3.0 deployment.&amp;nbsp; In this scenario, he used the Publish Wizard in VS 2008 to create a Word document solution and the install manifest.&amp;nbsp;&amp;nbsp; Then a bunch of people used the Word document, and kicked off the installer which then copied things to their ClickOnce cache.&amp;nbsp; Everything worked fine.&amp;nbsp; Then he needed to make changes to the code, recompile, and somehow get the solution to all of his customers.&amp;nbsp; Instead of using the Publish Wizard to create the update in the same server, he chose to use a different server path.&amp;nbsp; The customers were unable to install the updates.&amp;nbsp; He tried editing the custom properties of the document to change the install path to the new server, but it still didn’t work.&amp;nbsp; Then he tried testing with a new, clean computer, and on that computer he was able to install from the new path and use the new Word document.&amp;nbsp; He asked us why were the “old” users unable to get the update? &lt;p&gt;This question shows up on the Forum occasionally.&amp;nbsp; “Why can I not change the update location of VSTO v3 Add-in or Document once it is installed?”&amp;nbsp; (Or) “Why does VSTO continue to check in the old location even after I change location property on client machines that installed the old version?” &lt;p&gt;The Path to the deployment manifest is used as part of the Identity for an Add-in.&amp;nbsp; During the First installation of an Add-in or Document, the Full Path is set and stored by the VSTO Runtime for that client machine.&amp;nbsp; Once you have installed an Add-in changing the path in the registration will cause the Add-in to throw an Error.&amp;nbsp; Once you have installed a customized Document, the code-behind will only check the original location and changes to the path stored in the document will be ignored (this is to allow copying a local version of a customized document that you installed from a remote location).&amp;nbsp; In order to change the location that an Add-in or Document checks for updates, you must First uninstall the “old” version on the installed clients and then install from the new location.&amp;nbsp; &lt;p&gt;Now, if you want to delve deeper, then keep reading this paragraph, or skip to the next one.&amp;nbsp; The low-level explanation is that ClickOnce uses the solution path as part of its identity when storing solutions into the ClickOnce cache.&amp;nbsp;&amp;nbsp; You will get &lt;i&gt;similar&lt;/i&gt; behavior in a CO-deployed Windows Application as well _&lt;i&gt;unless&lt;/i&gt;_ you use the deploymentProviderURL (DPURL).&amp;nbsp; Setting the DPURL can allow WinForms applications to change where updates are pulled from so that Server A (from which a solution was original installed) can be decommissioned and updates can be retrieved from Server B.&amp;nbsp; VSTO does not support DPURL.&amp;nbsp; Why not, you ask?&amp;nbsp; At the time we were considering it during the development of VS 2008, the amount of development work-months required was more than the time we had remaining (DPURL has implications on migration of data from old solution to new solution, for instance).&amp;nbsp; After much discussion, we decided to have the ClickOnce team throw an exception of a DPURL is set for VSTO solutions.&amp;nbsp; At the start of development for VS 2010, we considered this feature again, but again this feature did not make our list of highest priority deployment features.&amp;nbsp; We are implementing a lot of new deployment features for VS 2010. &lt;p&gt;In conclusion, the solution Path is used as part of the identity.&amp;nbsp; You can’t change the update path after you've installed an Office solution.&amp;nbsp; In a Windows solution, you can change the update path using DPURL.&amp;nbsp; VSTO doesn’t support DPURL because we couldn’t fit that feature in the development schedule.&amp;nbsp; The workaround is to uninstall the solution from the user’s computer when it is stuck pointing to an old path that you can’t update anymore and then reinstall with a new Install Path set in the Publish wizard.&amp;nbsp; We recommend that you set your Install Path to a URL that you predict can stay the same for as long as your users will need updates. &lt;p&gt;This explanation applies to Word document and template solutions, and to Excel spreadsheet and template solutions. &lt;p&gt;I hope this blog entry is helpful!&amp;nbsp; Please leave comments to this article if you have feedback.&amp;nbsp; &lt;p&gt;-Kris Makey, Jeff Young, Christin Boyd, Mary Lee and Saurabh Bhatia contributed to this blog post&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9228873" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/ClickOnce/default.aspx">ClickOnce</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Christin+Boyd/default.aspx">Christin Boyd</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/Excel+2007/default.aspx">Excel 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VS2008/default.aspx">VS2008</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Manifest/default.aspx">Manifest</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Add+Remove+Programs/default.aspx">Add Remove Programs</category></item><item><title>Community Article: Enabling Speech Recognition in Microsoft Word 2007 with Visual Studio 2008 (Beth Massi)</title><link>http://blogs.msdn.com/vsto/archive/2008/10/21/community-article-enabling-speech-recognition-in-microsoft-word-2007-with-visual-studio-2008-beth-massi.aspx</link><pubDate>Wed, 22 Oct 2008 01:51:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9010472</guid><dc:creator>VSTO Team</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9010472.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9010472</wfw:commentRss><description>&lt;p&gt;A &lt;a href="http://msdn.microsoft.com/en-us/library/dd148511.aspx" target="_blank"&gt;new community submitted article&lt;/a&gt; was just released on the &lt;a href="http://msdn.com/vsto" target="_blank"&gt;Office Development with Visual Studio portal&lt;/a&gt; by MVP &lt;a href="http://community.visual-basic.it/Alessandro"&gt;Alessandro Del Sole&lt;/a&gt;. &lt;a href="http://msdn.microsoft.com/en-us/library/dd148511.aspx" target="_blank"&gt;In this article&lt;/a&gt; learn how to control the Vista operating system's speech recognition engine in .NET from a custom task pane in Microsoft Word 2007. This article compliments Alessandro's &lt;a href="http://msdn.microsoft.com/en-us/library/cc627340.aspx" target="_blank"&gt;previous article on a text-to-speech add-in&lt;/a&gt; for Word 2007. &lt;/p&gt; &lt;p&gt;Enjoy,&lt;br&gt;-&lt;a href="http://blogs.msdn.com/bethmassi" target="_blank"&gt;Beth Massi&lt;/a&gt;, Visual Studio Community&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9010472" 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/Word+2007/default.aspx">Word 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/Beth+Massi/default.aspx">Beth Massi</category><category domain="http://blogs.msdn.com/vsto/archive/tags/add-ins/default.aspx">add-ins</category></item><item><title>Word Add-ins Part 3: Search for Text Strings in Documents and Add Comments (Harry Miller)</title><link>http://blogs.msdn.com/vsto/archive/2008/09/10/word-add-ins-part-3-search-for-text-strings-in-documents-and-add-comments-harry-miller.aspx</link><pubDate>Thu, 11 Sep 2008 00:49:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8942135</guid><dc:creator>VSTO Team</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/vsto/comments/8942135.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=8942135</wfw:commentRss><description>&lt;p&gt;You can search the text in any open Microsoft Office Word document for specific strings if you put the code in an application-level add-in. When you find an instance of the string, you can perform some action on it. This video shows how to flag the string with a comment that contains text passed in from a calling method.&lt;/p&gt;  &lt;p&gt;The code comes from the forum thread that's linked below, under &amp;quot;Related resources.&amp;quot; You could just look at it there, but then you'd miss the whole &amp;quot;why did he get knocked in the head last time&amp;quot; thing. Oh, the title is different in the video because no one would search the Web for &amp;quot;to hunt lives the add-in&amp;quot; to answer this question, but I think it's a much more dramatic title for a video about an add-in that searches for stuff, after you've already found the video.&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=3595121&amp;amp;SiteID=1" target="_blank"&gt;Forum: Look for a string and comment it - how?&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/f1f367bx.aspx" target="_blank"&gt;How to: Search for Text in Documents&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/tf2wdd02.aspx" target="_blank"&gt;How to: Set Search Options in Word&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb211938.aspx" target="_blank"&gt;Find Object (Word 2007 Reference)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Duration: 3 minutes, 39 seconds&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:752073b7-c8ed-44ba-b2d0-12dcefafbc0a" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;div id="f57663f3-72ab-4926-8b49-22c7746d93c0" style="margin: 0px; padding: 0px; display: inline;"&gt;&lt;div&gt;&lt;a href="http://video.msn.com/video.aspx?vid=1a14c07f-db93-4a18-9fa4-f8387eb19691&amp;amp;from=writer" target="_new"&gt;&lt;img src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/WordAddinsPart3SearchforTextStringsandAd_C9ED/videod1f2fafeb726.jpg" galleryimg="no" onload="var downlevelDiv = document.getElementById('f57663f3-72ab-4926-8b49-22c7746d93c0'); 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=1a14c07f-db93-4a18-9fa4-f8387eb19691&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=8942135" width="1" height="1"&gt;</description><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><category domain="http://blogs.msdn.com/vsto/archive/tags/add-ins/default.aspx">add-ins</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>Catching Save or SaveAs in Word 2007 (Harry Miller)</title><link>http://blogs.msdn.com/vsto/archive/2008/07/03/catching-save-or-saveas-in-word-2007.aspx</link><pubDate>Fri, 04 Jul 2008 00:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8685786</guid><dc:creator>VSTO Team</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/vsto/comments/8685786.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=8685786</wfw:commentRss><description>&lt;P&gt;You can override Ribbon commands and run your own code for Save or Save As, or you can simply cancel attempts to save a document in the DocumentBeforeSave event handler.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Code and resources:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://forums.microsoft.com/Forums/ShowPost.aspx?PostID=2958175&amp;amp;SiteID=1" target=_blank mce_href="http://forums.microsoft.com/Forums/ShowPost.aspx?PostID=2958175&amp;amp;SiteID=1"&gt;Forum post: Microsoft Word 2007 Disable Save As&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/bb462633.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/bb462633.aspx"&gt;Temporarily Repurpose Commands on the Office Fluent Ribbon&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/bb221290.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/bb221290.aspx"&gt;DocumentBeforeSave event&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Video duration: 51 seconds&lt;/P&gt;
&lt;DIV class=wlWriterSmartContent id=scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:715a948f-dff4-4852-ad8d-95967dff7c65 style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;
&lt;DIV id=cc40a160-9cfe-46b7-b18b-4db4e8bf1f11 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=b787232c-49a8-4a3a-bd77-658cd304b014&amp;amp;from=writer" target=_new mce_href="http://video.msn.com/video.aspx?vid=b787232c-49a8-4a3a-bd77-658cd304b014&amp;amp;from=writer"&gt;&lt;IMG alt="" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/CatchingSaveorSaveAsinWord2007_D0A7/video550e2d8692f1.jpg" onload="var downlevelDiv = document.getElementById('cc40a160-9cfe-46b7-b18b-4db4e8bf1f11'); 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=b787232c-49a8-4a3a-bd77-658cd304b014&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/CatchingSaveorSaveAsinWord2007_D0A7/video550e2d8692f1.jpg"&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8685786" width="1" height="1"&gt;</description><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>Peek at Service Pack 1 (Christin Boyd)</title><link>http://blogs.msdn.com/vsto/archive/2008/05/11/peek-at-service-pack-1-christin-boyd.aspx</link><pubDate>Mon, 12 May 2008 08:42:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8491913</guid><dc:creator>VSTO Team</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/vsto/comments/8491913.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=8491913</wfw:commentRss><description>&lt;p&gt;Visual Studio 2008 Service Pack 1 is not finished yet, but we do have a beta version of the documentation ready for you to read!&amp;nbsp; You can learn about some of the features that you'll see later this year when we release SP1.&amp;nbsp; &lt;/p&gt; &lt;p&gt;I recommend starting with reading about a totally new feature that we put into SP1 that allows you to extend Word documents and Excel Workbooks at runtime from an Application-Level Add-in.&amp;nbsp; Here is the link to the Beta of the documentation:&lt;/p&gt; &lt;p&gt;&lt;a href="http://vs2008sp1docs.msdn.microsoft.com/en-us/ms334311.aspx"&gt;http://vs2008sp1docs.msdn.microsoft.com/en-us/ms334311.aspx&lt;/a&gt;&lt;/p&gt; &lt;p&gt;You'll be able to create objects and respond to events including:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Host Controls  &lt;li&gt;ListObjects  &lt;li&gt;Smart Tags  &lt;li&gt;Word Content Controls  &lt;li&gt;and Events such as DocumentBeforeSave&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Only some of the new deployment features have been documented so far.&amp;nbsp; You can read about one of the new deployment features in the &lt;a href="http://vs2008sp1docs.msdn.microsoft.com/en-us/ms331997.aspx" target="_blank"&gt;Event Logging (2007 System)&lt;/a&gt; page in the SP1 documentation here:&lt;/p&gt; &lt;p&gt;&lt;a title="http://vs2008sp1docs.msdn.microsoft.com/en-us/ms331997.aspx" href="http://vs2008sp1docs.msdn.microsoft.com/en-us/ms331997.aspx"&gt;http://vs2008sp1docs.msdn.microsoft.com/en-us/ms331997.aspx&lt;/a&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Starting in Visual Studio 2008 Service Pack 1 (SP1), you can use the event viewer in Windows to see error messages that are captured by the Visual Studio Tools for Office runtime when you install or uninstall Visual Studio Tools for Office solutions. You can use these messages from the event logger to resolve installation and deployment problems.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The Beta version of the Service Pack is only getting distributed to about a thousand beta testers who have great reputations for submitting clear feedback and bug reports.&amp;nbsp; I hope this little peek at the documentation will get you excited about what's coming later this summer in Service Pack 1. &lt;/p&gt; &lt;p&gt;-Christin Boyd, Program Manager&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8491913" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/ClickOnce/default.aspx">ClickOnce</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Christin+Boyd/default.aspx">Christin Boyd</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/Word+2007/default.aspx">Word 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Excel+2007/default.aspx">Excel 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.msdn.com/vsto/archive/tags/smart+tags/default.aspx">smart tags</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VB/default.aspx">VB</category><category domain="http://blogs.msdn.com/vsto/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>Visual Studio Command Bar for Arranging Controls on Documents and Worksheets (McLean Schofield)</title><link>http://blogs.msdn.com/vsto/archive/2008/04/10/visual-studio-command-bar-for-arranging-controls-on-documents-and-worksheets.aspx</link><pubDate>Fri, 11 Apr 2008 00:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8376521</guid><dc:creator>VSTO Team</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/vsto/comments/8376521.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=8376521</wfw:commentRss><description>&lt;P&gt;One of the lesser-known features of Visual Studio Tools for Office is the &lt;STRONG&gt;Microsoft Office Word&lt;/STRONG&gt; and &lt;STRONG&gt;Microsoft Office Excel&lt;/STRONG&gt; command bar. When you are developing a document-level project for Word or Excel (for example, a Word Document or Excel Workbook project) and you have the document or one of your worksheets open in the designer, this command bar appears in Visual Studio, just above the designer. In Excel, this command bar looks like the following by default. 
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image_10.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image_10.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=168 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image_thumb_1.png" width=497 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image_thumb_1.png"&gt;&lt;/A&gt;&amp;nbsp; 
&lt;P&gt;The first several buttons in this command bar are for changing the keyboard scheme and mapping XML to the document or worksheet. This post is about the purpose of the rest of the buttons. 
&lt;P&gt;If you are designing a custom UI for your document or worksheet that includes Windows Forms controls that you add by using the designer, you can use these buttons to arrange the controls with a single click. When you select multiple controls in the designer, these buttons become enabled. 
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image16.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image16.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=37 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image16_thumb.png" width=263 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image16_thumb.png"&gt;&lt;/A&gt;&amp;nbsp; 
&lt;P&gt;From left to right, here are the buttons you can use: 
&lt;UL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Align Lefts&lt;/STRONG&gt;. This button moves all of the controls to the left, so that they are aligned with the left side of the left-most control.&lt;/P&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Align Centers&lt;/STRONG&gt;. This button moves all of the controls left or right so that they are aligned around the vertical axis of the widest control.&lt;/P&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Align Rights&lt;/STRONG&gt;. This button moves all of the controls to the right, so that they are aligned with the right side of the right-most control.&lt;/P&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Align Tops&lt;/STRONG&gt;. This button moves all of the controls up, so that they are aligned with the top side of the upper-most control.&lt;/P&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Align Middles&lt;/STRONG&gt;. This button moves all of the controls up or down, so that they are aligned around the horizontal axis of the tallest control.&lt;/P&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Align Bottoms&lt;/STRONG&gt;. This button moves all of the controls down, so that they are aligned with the bottom side of the bottom-most control.&lt;/P&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Make Horizontal Spacing Equal&lt;/STRONG&gt;. The left-most and right-most control remain in place; the controls in between move horizontally so that there is equal horizontal space between each control.&lt;/P&gt;
&lt;LI&gt;&lt;STRONG&gt;Make Vertical Spacing Equal&lt;/STRONG&gt;. The top-most and bottom-most control remain in place; the controls in between move vertically so that there is equal vertical space between each control.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;A special note about Word.&lt;/STRONG&gt; In Word projects, the alignment buttons are enabled only if the selected controls are &lt;EM&gt;not&lt;/EM&gt; in line with text. By default, controls that you add to a Word document at design time are in line with text. To change the layout style of the control, right-click the control and then click &lt;STRONG&gt;Format Control&lt;/STRONG&gt;. Then, on the &lt;STRONG&gt;Layout&lt;/STRONG&gt; tab, select a wrapping style other than &lt;STRONG&gt;In line with text&lt;/STRONG&gt;:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image55.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image55.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=202 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image55_thumb.png" width=461 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image55_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Examples.&lt;/STRONG&gt; Enough words! Here are some examples that show these alignment options in action. These examples are pretty contrived, but they should give you an idea of the effects of each option.&lt;/P&gt;
&lt;P&gt;Given the following buttons on a worksheet:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image19.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image19.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=232 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image19_thumb.png" width=384 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image19_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Align Lefts&lt;/STRONG&gt; rearranges the controls as follows:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image_16.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image_16.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=244 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image_thumb_7.png" width=240 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image_thumb_7.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Align Centers&lt;/STRONG&gt; rearranges the controls as follows:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image_18.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image_18.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=244 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image_thumb_8.png" width=238 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image_thumb_8.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;And &lt;STRONG&gt;Align Rights&lt;/STRONG&gt; rearranges the controls as follows:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image_20.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image_20.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=244 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image_thumb_9.png" width=240 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image_thumb_9.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Given the following buttons on a worksheet:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image40.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image40.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=221 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image40_thumb.png" width=398 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image40_thumb.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Align Tops&lt;/STRONG&gt; rearranges the controls as follows:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image43.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image43.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=116 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image43_thumb.png" width=400 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image43_thumb.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Align Middles&lt;/STRONG&gt; rearranges the controls as follows:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image37.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image37.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=136 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image37_thumb.png" width=406 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image37_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;And &lt;STRONG&gt;Align Bottoms&lt;/STRONG&gt; rearranges the controls as follows:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image46.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image46.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=134 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image46_thumb.png" width=400 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image46_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Given the following buttons on a worksheet:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image49.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image49.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=56 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image49_thumb.png" width=566 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image49_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Make Horizontal Spacing Equal&lt;/STRONG&gt; rearranges the controls as follows:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image52.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image52.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=54 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image52_thumb.png" width=576 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image52_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Finally, given the following buttons on a worksheet:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image64.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image64.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=306 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image64_thumb.png" width=173 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image64_thumb.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Make Vertical Spacing Equal&lt;/STRONG&gt; rearranges the controls as follows:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image67.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image67.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=297 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image67_thumb.png" width=186 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HiddenVSTOFeature_9861/image67_thumb.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope these options come in handy then next time you are adding controls to a document or worksheet in VSTO.&lt;/P&gt;
&lt;P&gt;-------------------------------------------------&lt;/P&gt;
&lt;P&gt;McLean Schofield, Programming Writer&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8376521" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/Command+bars/default.aspx">Command bars</category><category domain="http://blogs.msdn.com/vsto/archive/tags/McLean+Schofield/default.aspx">McLean Schofield</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Excel+2003/default.aspx">Excel 2003</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/Word+2003/default.aspx">Word 2003</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Excel+2007/default.aspx">Excel 2007</category></item></channel></rss>