<?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 : VSTO</title><link>http://blogs.msdn.com/vsto/archive/tags/VSTO/default.aspx</link><description>Tags: VSTO</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Migrating an Outlook Solution to .NET Framework 4 in Visual Studio 2010 (Norm Estabrook)</title><link>http://blogs.msdn.com/vsto/archive/2009/12/16/migrating-an-outlook-solution-to-net-framework-4-in-visual-studio-2010-norm-estabrook.aspx</link><pubDate>Wed, 16 Dec 2009 22:33:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9937915</guid><dc:creator>VSTO Team</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9937915.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9937915</wfw:commentRss><description>&lt;p&gt;Visual Studio can help migrate your Outlook solutions from .NET Framework 3.5 to the .NET Framework 4. However, you still have to do a few things manually to make it all work.&amp;#160; &lt;/p&gt;  &lt;p&gt;Beth Massi converts an Outlook Solution that targets the .NET Framework 3.5 to an Outlook Solution that targets the .NET Framework 4 client profile in this very cool and informative blog entry - &lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/12/15/migrating-an-outlook-client-to-net-framework-4-in-visual-studio-2010.aspx"&gt;Migrating an Outlook Client to .NET Framework 4 in Visual Studio 2010&lt;/a&gt;. &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9937915" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Norm+Estabrook/default.aspx">Norm Estabrook</category><category domain="http://blogs.msdn.com/vsto/archive/tags/.NET+Framework+Client+Profile/default.aspx">.NET Framework Client Profile</category><category domain="http://blogs.msdn.com/vsto/archive/tags/migration/default.aspx">migration</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/VS2010/default.aspx">VS2010</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+Development/default.aspx">Office Development</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Visual+Studio+2010/default.aspx">Visual Studio 2010</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+2010/default.aspx">Office 2010</category></item><item><title>Making a Custom Group Appear in the Message Tab of a Mail Item (Norm Estabrook)</title><link>http://blogs.msdn.com/vsto/archive/2009/12/15/making-a-custom-group-appear-in-the-message-tab-of-a-mail-item-norm-estabrook.aspx</link><pubDate>Tue, 15 Dec 2009 22:14:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9937317</guid><dc:creator>VSTO Team</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9937317.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9937317</wfw:commentRss><description>&lt;p&gt;You can add a custom group to the &lt;strong&gt;Message&lt;/strong&gt; tab of an Outlook mail item.&amp;#160; For example, here is a custom group named &amp;quot;MyCoolGroup&amp;quot; that I added to the message tab of a new message:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_9.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_9.png"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_thumb_3.png" width="674" height="227" mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_thumb_3.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Outlook lets you open a message in the following two modes: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Compose (you are drafting a new message). &lt;/li&gt;    &lt;li&gt;Read (you are reading a message).&amp;#160; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Making a custom group appear for only one of these modes is pretty easy.&amp;#160; Making it appear for both modes is a tad more challenging. That is because the control ID of the &lt;strong&gt;Message&lt;/strong&gt; tab in read mode is different than the control ID of the &lt;strong&gt;Message&lt;/strong&gt; tab in compose mode. When you design your custom group in the VSTO Ribbon designer, you can only specify &lt;strong&gt;one&lt;/strong&gt; control ID. This means that when you run the project, the custom group will only appear in the &lt;strong&gt;Message&lt;/strong&gt; tab of a compose window or the &lt;strong&gt;Message&lt;/strong&gt; tab of a read window depending on which control ID you specify at design-time. &lt;/p&gt;  &lt;p&gt;If you want the group to appear in both versions of the &lt;strong&gt;Message&lt;/strong&gt; tab (read and compose), you have to do a bit more work. Here is how you make the group appear for both modes:&lt;/p&gt;  &lt;p&gt;First, add a &lt;strong&gt;Ribbon (Visual Designer)&lt;/strong&gt; to an Outlook 2007 add-in project.&lt;/p&gt;  &lt;p&gt;Then, set the &lt;strong&gt;RibbonType&lt;/strong&gt; property of the Ribbon to &lt;strong&gt;Microsoft.Outlook.Mail.Read&lt;/strong&gt; as follows:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_10.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_thumb.png" width="283" height="393" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;On the Ribbon designer, add a group to a tab and customize the group as desired.&amp;#160; &lt;/p&gt;  &lt;p&gt;On the Ribbon designer, select the tab, open the &lt;strong&gt;Properties&lt;/strong&gt; window, and then set the &lt;strong&gt;OfficeId&lt;/strong&gt; of the tab to &lt;strong&gt;TabReadMessage&lt;/strong&gt;.&amp;#160; &lt;strong&gt;TabReadMessage&lt;/strong&gt; is the control ID of the default tab that appears on the Ribbon of a mail message that is open in read mode.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_7.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_7.png"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_thumb_2.png" width="405" height="336" mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_thumb_2.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Ok. Now when you run the project, your custom group will appear only if you open a mail item in read mode. Now you need to add second Ribbon to your project to display this custom group in a mail item that is open in compose mode.&lt;/p&gt;  &lt;p&gt;Add a second &lt;strong&gt;Ribbon (Visual Designer)&lt;/strong&gt; to the project. Then, set the &lt;strong&gt;RibbonType&lt;/strong&gt; property of the Ribbon to &lt;strong&gt;Microsoft.Outlook.Mail.Compose&lt;/strong&gt; as follows:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_12.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DisplayingaCustomGroupinBoththeOutlookMa_D2A0/image_thumb_4.png" width="295" height="399" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;On the Ribbon designer, select the tab of the second Ribbon, open the &lt;strong&gt;Properties&lt;/strong&gt; window, and then set the &lt;strong&gt;OfficeId&lt;/strong&gt; of the tab to &lt;strong&gt;TabNewMailMessage&lt;/strong&gt;.&amp;#160; &lt;strong&gt;TabNewMailMessage&lt;/strong&gt; is the control ID of the default tab that appears on the Ribbon of a mail message that is open in compose mode.&amp;#160; &lt;/p&gt;  &lt;p&gt;I know what your thinking. Do you mean I have to create two separate custom groups? That defeats the whole point of trying to do this right?&amp;#160; Yes that would. Fortunately, you don’t have to create two custom groups. You only have to create two Ribbons as I have shown here. You can use the same custom group in both Ribbons.&amp;#160; Here is how:&lt;/p&gt;  &lt;p&gt;Open the first Ribbon that you created in the Ribbon Designer.&amp;#160; In the Ribbon Designer, select your custom group. In the &lt;strong&gt;Properties&lt;/strong&gt; window, set the &lt;strong&gt;Modifiers&lt;/strong&gt; property of the group to &lt;strong&gt;Public&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;Open the code file of the second Ribbon that you created (called Ribbon2 in my project).&lt;/p&gt;  &lt;p&gt;In the constructor of the second Ribbon, add the custom group from Ribbon1 to Ribbon2 as follows: &lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;Ribbon2()
{
    InitializeComponent();
    &lt;span style="color: #2b91af"&gt;Ribbon1 &lt;/span&gt;firstRibbon = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Ribbon1&lt;/span&gt;();
    &lt;span style="color: blue"&gt;this&lt;/span&gt;.tab1.Groups.Add(firstRibbon.group1);
}&lt;/pre&gt;

&lt;p&gt;You can read more about adding custom groups to built-in tabs in the following MSDN articles:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb608593.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb608593.aspx"&gt;How to: Customize a Built-in tab&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb608616.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb608616.aspx"&gt;How to: Get Started Customizing the Ribbon&lt;/a&gt;&lt;/p&gt;
&lt;a href="http://msdn2.microsoft.com/en-us/library/bb386089.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb386089.aspx"&gt;Ribbon Designer&lt;/a&gt; 

&lt;p&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb398246.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb398246.aspx"&gt;Customizing a Ribbon for Outlook&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9937317" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Norm+Estabrook/default.aspx">Norm Estabrook</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Ribbon/default.aspx">Ribbon</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+2007/default.aspx">Office 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VS2008/default.aspx">VS2008</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+Development/default.aspx">Office Development</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+2010/default.aspx">Office 2010</category></item><item><title>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>Office 2010 Beta &amp; SharePoint 2010 Beta Now Available to the Public (Beth Massi)</title><link>http://blogs.msdn.com/vsto/archive/2009/11/18/office-2010-beta-sharepoint-2010-beta-now-available-to-the-public-beth-massi.aspx</link><pubDate>Wed, 18 Nov 2009 18:54:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9924532</guid><dc:creator>VSTO Team</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9924532.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9924532</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://blogs.msdn.com/vsto/archive/2009/11/16/office-sharepoint-2010-betas-available-beth-massi.aspx"&gt;Monday Office and SharePoint 2010 Beta were released&lt;/a&gt; to MSDN/TechNet subscribers. Today it was announced at PDC that these are available to the rest of the public! Come and get it…&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/office/2010/" target="_blank"&gt;&lt;strong&gt;Office 2010 Beta&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sharepoint.microsoft.com/2010/" target="_blank"&gt;&lt;strong&gt;SharePoint 2010 Beta&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;These Betas are compatible with &lt;a href="http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx" target="_blank"&gt;Visual Studio 2010 Beta 2&lt;/a&gt; which was released to the public a few weeks ago. We’ve also started a series on Channel 9 on SharePoint development in Visual Studio so check that out starting with:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://channel9.msdn.com/posts/funkyonex/Overview-of-SharePoint-Development-in-Visual-Studio-2010/"&gt;&lt;strong&gt;Overview of SharePoint Development in Visual Studio 2010&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Also check out…&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Office 2010 resources&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.technet.com/office2010/archive/2009/11/16/announcing-office-2010-beta-availability.aspx"&gt;Announcing Office 2010 Beta Availability&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vsto/ee676911.aspx"&gt;Office Development in Visual Studio 2010 Beta Samples, Walkthroughs and Videos &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/officedevelopmentprerelease/threads"&gt;Submit your feedback in the Office Development in Visual Studio 2010 Forums&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/office/ee513173.aspx"&gt;Office 2010 Beta Resources&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.technet.com/gray_knowlton/archive/2009/11/10/office-2010-application-compatibility-deep-dive-on-the-code-compatibility-inspector.aspx"&gt;Office 2010 Application Compatibility Tools&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;SharePoint 2010 Resources&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/sharepoint/archive/2009/11/18/sharepoint-2010-public-beta-is-now-available-for-download.aspx"&gt;SharePoint 2010 Public Beta is now available for download&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/sharepoint/ee513147.aspx"&gt;SharePoint 2010 Development Resources&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/dd441784.aspx#Sharepoint"&gt;SharePoint Development in Visual Studio 2010 Walkthroughs&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopmentprerelease/threads"&gt;SharePoint Development Forums&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;And stay tuned here for more posts on &lt;a href="http://blogs.msdn.com/vsto/archive/tags/VS2010/default.aspx" target="_blank"&gt;Office Development with Visual Studio 2010&lt;/a&gt;!&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=9924532" 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/Beth+Massi/default.aspx">Beth Massi</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VS2010/default.aspx">VS2010</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Visual+Studio+2010/default.aspx">Visual Studio 2010</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+2010/default.aspx">Office 2010</category><category domain="http://blogs.msdn.com/vsto/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category></item><item><title>Using Windows Presentation Foundation and Line-of-Business Data in Microsoft Office Clients (Beth Massi)</title><link>http://blogs.msdn.com/vsto/archive/2009/08/11/using-windows-presentation-foundation-and-line-of-business-data-in-microsoft-office-clients-beth-massi.aspx</link><pubDate>Wed, 12 Aug 2009 02:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9865164</guid><dc:creator>VSTO Team</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9865164.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9865164</wfw:commentRss><description>&lt;p&gt;I &lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/08/10/using-windows-presentation-foundation-in-office-clients.aspx" target="_blank"&gt;mentioned on my blog yesterday&lt;/a&gt; that &lt;a href="http://www.sdn.nl/SDN/Magazine/tabid/66/articleType/ArticleView/articleId/2870/SDN-Magazine-101-Women-In-Technology-is-uit.aspx" target="_blank"&gt;SDN Magazine&lt;/a&gt; made an article I wrote back in May available online -- and since it’s all about using WPF &amp;amp; data in a VSTO solution I thought I’d post the link up here too :-)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.sdn.nl/SDN/Artikelen/tabid/58/agentType/View/PropertyID/2982/Default.aspx"&gt;&lt;strong&gt;Using Windows Presentation Foundation and Line-of-Business Data in Microsoft Office Clients&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In this article I talk about how to expose Line-of-Business data via ADO.NET Data Services to an Excel client using WPF. Office solutions you build with Visual Studio are designed to work with Windows Forms controls but you can also use WPF controls in your solutions as well. Any UI element that can host Windows Forms controls in an Office solution (VSTO) can also host WPF controls using the &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.integration.elementhost.aspx"&gt;Winforms ElementHost&lt;/a&gt; as a container. &lt;/p&gt;  &lt;p&gt;Using WPF controls in Office allows you to think out of the box and provide world-class data visualizations that are not possible with Windows Forms controls. And you can do it easily in an instantly familiar end-user application like those in the Office family. But what if you don’t have any fancy data visualizations? Even the simplest controls that display data are often better off as WPF controls in Office applications because they better match the UI styles used in the latest versions of Office. Using WPF can make your add-ins look built into the Office applications themselves, providing a better user experience.&lt;/p&gt;  &lt;p&gt;This article describes one piece of the Northwind Office Business Application (OBA) sample we created in the beginning of the year so if you’re just getting started in OBA development with Outlook, Word, Excel and Sharepoint I’d suggest reading these as well:&lt;/p&gt;  &lt;li&gt;&lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/02/03/oba-part-1-exposing-line-of-business-data.aspx"&gt;OBA Part 1 - Exposing Line-of-Business Data&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/02/07/oba-part-2-building-and-outlook-client-against-lob-data.aspx"&gt;OBA Part 2 - Building and Outlook Client against LOB Data&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/02/12/oba-part-3-storing-and-reading-data-in-word-documents.aspx"&gt;OBA Part 3 - Storing and Reading Data in Word Documents&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/03/08/oba-part-4-building-an-excel-client-against-lob-data.aspx"&gt;OBA Part 4 - Building an Excel Client against LOB Data&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/04/21/oba-part-5-building-the-sharepoint-2007-workflow.aspx"&gt;OBA Part 5 - Building the SharePoint 2007 Workflow&lt;/a&gt;&lt;/li&gt;  &lt;p&gt;The full sample application, built with Visual Studio 2008, is here: &lt;a href="http://code.msdn.microsoft.com/OBANorthwind"&gt;http://code.msdn.microsoft.com/OBANorthwind&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Hmm… I’m thinking a part 6 on deployment of this baby would be a good follow up….&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=9865164" 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/Office+2007/default.aspx">Office 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/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/WPF/default.aspx">WPF</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Beth+Massi/default.aspx">Beth Massi</category></item><item><title>Will your VSTO addin run on Office 2010 64-bit? Yes, probably. (Christin Boyd)</title><link>http://blogs.msdn.com/vsto/archive/2009/08/05/will-your-vsto-addin-run-on-office-2010-64-bit-yes-probably-christin-boyd.aspx</link><pubDate>Thu, 06 Aug 2009 01:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9858450</guid><dc:creator>VSTO Team</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9858450.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9858450</wfw:commentRss><description>&lt;p&gt;The Visual Studio team is designing the runtime components for Office 2010 so that your Visual Studio Tools for Office 2005 and Visual Studio 2008 .NET addins, document solutions and spreadsheet solutions will run on 64-bit Office 2010.&amp;#160; These runtime components will ship with Office 2010, so your end-users won’t even have to download a new runtime!&amp;#160; How easy is that?&amp;#160; There are a few rare exceptions that I’ll discuss in this blog entry.&amp;#160; &lt;/p&gt;  &lt;p&gt;The miracle of managed code allows you to write C# or Visual Basic .NET code that compiles to “Any CPU” using the Compile setting in your Visual Studio project.&amp;#160; Your code compiles to MSIL with Visual Studio, and then at runtime it gets JIT compiled to the correct chip set, either AMD, Intel, 32-bit or 64-bit.&amp;#160; The first exception to this wondrous technology is the oldest versions of .NET Framework 1.0 and 1.1 will not enable this 64-bit transformation.&lt;/p&gt;  &lt;p&gt;The other thing to lookout for is calls to process invoke (p/invoke) in your code. If you try to call native API methods using p/invoke you could have issues with your VSTO solution running properly on 64-bit Office 2010.&amp;#160; &lt;/p&gt;  &lt;p&gt;You will have problems if your code makes deliberate calls to p/invoke a Win32 API that does not have exactly the same signature (method name, parameter list, and DLL name) of an equivalent Win64 API.&amp;#160; This is true for any solution you write regardless of targeting Office as the platform.&amp;#160; You can find a ton of information in MSDN and blogs by such luminaries as Scott Hanselman about writing Windows API calls so that they will run on either 32-bit or 64-bit Windows.&amp;#160; Here is a generalized code snippet for handling cases where the method name or the DLL name is different:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div id="codeSnippetWrapper" style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; height: 244px; background-color: #f4f4f4; text-align: left"&gt;   &lt;pre id="codeSnippet" 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;p align="left"&gt;&lt;span style="color: #008000"&gt;//YourFunction has the same name, parameters, and DLL name in 32bit and 64bit&lt;/span&gt;&lt;br /&gt;YourFunction();&lt;br /&gt;&lt;br /&gt;Import(&lt;span style="color: #006080"&gt;&amp;quot;LIBRARY&amp;quot;&lt;/span&gt;, EntryPoint = &lt;span style="color: #006080"&gt;&amp;quot;YOURFUNCTION&amp;quot;&lt;/span&gt;, CharSet = CharSet.Unicode)]&lt;br /&gt;private &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;extern&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; YouFunction();&lt;/p&gt;&lt;p align="left"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;//In some cases, the method name is different in Win32 API and Win64 API, &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;//so use the following code block in stead of the above 3 lines of code.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (Marshal.SizeOf(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(IntPtr)) == 4)&lt;br /&gt;{&lt;br /&gt;    YourFunction32();&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: #0000ff"&gt;else&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (Marshal.SizeOf(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(IntPtr)) == 8)&lt;br /&gt;{&lt;br /&gt;    YourFunction64();&lt;br /&gt;}&lt;/p&gt;&lt;p align="left"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Import(&lt;span style="color: #006080"&gt;&amp;quot;LIBRARY32&amp;quot;&lt;/span&gt;, EntryPoint = &lt;span style="color: #006080"&gt;&amp;quot;YOURFUNCTION32&amp;quot;&lt;/span&gt;, CharSet = CharSet.Unicode)]&lt;br /&gt;private &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;extern&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; YourFunction32();&lt;br /&gt;&lt;br /&gt;Import(&lt;span style="color: #006080"&gt;&amp;quot;LIBRARY64&amp;quot;&lt;/span&gt;, EntryPoint = &lt;span style="color: #006080"&gt;&amp;quot; YOURFUNCTION64&amp;quot;&lt;/span&gt;, CharSet = CharSet.Unicode)]&lt;br /&gt;private &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;extern&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; YourFunction64();&lt;br /&gt;&lt;/p&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;h3&gt;Resources:&lt;/h3&gt;

&lt;p&gt;Here are more resources to help you author your solutions today so that they will run without needing a recompile when your users install 64-bit Office 2010.&lt;/p&gt;

&lt;p&gt;MSDN Library Visual Studio 2005 article on developing &lt;a href="http://msdn.microsoft.com/en-us/library/ms241064(VS.80).aspx" target="_blank"&gt;64-bit Applications&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MSDN Library Visual Studio 2008 article on developing &lt;a href="http://msdn.microsoft.com/en-us/library/ms241064.aspx" target="_blank"&gt;64-bit Applications&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cumgranosalis/archive/2005/12/09/Win64RegistryPart1.aspx" target="_blank"&gt;How to access the “real” x64 registry from a Win32 .NET Application – Part I&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms953313.aspx" target="_blank"&gt;The Myth of .NET Purity, Reloaded&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For migrating your really old apps with lots of native calls to .NET, try checking if your native calls have an equivalent .NET call:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa302340.aspx" target="_blank"&gt;Microsoft Win32 to Microsoft .NET Framework API Map&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/sd10k43k.aspx" target="_blank"&gt;Interoperating with Unmanaged Code&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Finally I should mention that this is my last post (for a while at least) on this blog because I am leaving Microsoft.&amp;#160; I’m going to work on a charity project teaching robotics programming to high school kids in my “inner city” neighborhood for at least the next 6 months.&amp;#160; The project is called &lt;a href="http://www.teamxbot.org/" target="_blank"&gt;Team Xbot&lt;/a&gt;!&amp;#160; Keep an eye on these kids as they go on to good colleges and great jobs in the next few years!&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Sincerely, Christin Boyd, Program Manager&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9858450" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/runtime/default.aspx">runtime</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/primary+interop+assemblies/default.aspx">primary interop assemblies</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+Development/default.aspx">Office Development</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+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>Demonstrating how to sync Facebook events to Outlook</title><link>http://blogs.msdn.com/vsto/archive/2009/08/05/demonstrating-how-to-sync-facebook-events-to-outlook.aspx</link><pubDate>Wed, 05 Aug 2009 19:59:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9858214</guid><dc:creator>VSTO Team</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9858214.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9858214</wfw:commentRss><description>&lt;p&gt;Every once in a while, we learn of neat apps that have been created with the Office development tools in Visual Studio. In an Outlook 2007 add-in, Jake Ginnivan combined WPF and the Facebook API to respond to Facebook events from a Ribbon. In addition, this add-in works in Outlook 2010 and has been deployed with ClickOnce.&amp;#160; He’s written about this in two parts:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://jake.ginnivan.net/2009/07/writing-a-facebook-event-synchroniser-for-outlook-2007-part-1/"&gt;Writing a Facebook event synchroniser for Outlook 2007+ Part 1&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://jake.ginnivan.net/2009/07/writing-a-facebook-event-synchroniser-for-outlook-2007-part-2/"&gt;Writing a Facebook event synchroniser for Outlook 2007+ Part 2&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you have come across other VSTO apps, feel free to leave a link in a comment here.&lt;/p&gt;  &lt;p&gt;Mary Lee, Programming Writer.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9858214" 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/Mary+Lee/default.aspx">Mary Lee</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/WPF/default.aspx">WPF</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+2010/default.aspx">Office 2010</category></item><item><title>Quick Videos of Visual Studio 2010 Features (Beth Massi, Mary Lee)</title><link>http://blogs.msdn.com/vsto/archive/2009/08/03/quick-videos-of-visual-studio-2010-features-beth-massi-mary-lee.aspx</link><pubDate>Mon, 03 Aug 2009 21:38:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9856430</guid><dc:creator>VSTO Team</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9856430.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9856430</wfw:commentRss><description>&lt;p&gt;If you’ve missed them, &lt;a href="http://blogs.msdn.com/kathleen" target="_blank"&gt;Kathleen&lt;/a&gt; has been &lt;a href="http://blogs.msdn.com/kathleen/archive/tags/VS2010/Visual+Studio+Content/default.aspx" target="_blank"&gt;interviewing writers&lt;/a&gt; on various documentation teams on some of the new features going into Visual Studio 2010. Our own &lt;a href="http://blogs.msdn.com/vsto/archive/tags/Mary+Lee/default.aspx" target="_blank"&gt;Mary Lee&lt;/a&gt; now has a couple video interviews posted on new VSTO features that you should check out:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/vsto/archive/2009/06/04/video-interview-mary-lee-on-deploying-multiple-office-solutions-kathleen-mcgrath.aspx"&gt;Video: Deploying Multiple Office Solutions in a Single Installer &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/kathleen/archive/2009/07/17/video-copying-a-document-to-the-end-user-computer-after-a-clickonce-installation.aspx"&gt;Video: Copying a Document to the End User Computer after a ClickOnce Installation&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;If you like reading better than watching videos, here are the walkthroughs in the MSDN library:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd465290(VS.100).aspx"&gt;Walkthrough: Deploying Multiple Office Solutions in a Single ClickOnce Installer&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd465291(VS.100).aspx"&gt;Walkthrough: Copying a Document to the End User Computer after a ClickOnce Installation&lt;/a&gt;.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;For more resources and information on how to download the VS2010 Beta, visit the &lt;a href="http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx" target="_blank"&gt;Visual Studio Developer Center&lt;/a&gt;.&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=9856430" 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/Mary+Lee/default.aspx">Mary Lee</category><category domain="http://blogs.msdn.com/vsto/archive/tags/video/default.aspx">video</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Kathleen+McGrath/default.aspx">Kathleen McGrath</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/VS2010/default.aspx">VS2010</category></item><item><title>BUG: “Old format or invalid type library” error when automating Excel (Christin Boyd)</title><link>http://blogs.msdn.com/vsto/archive/2009/07/06/bug-old-format-or-invalid-type-library-error-when-automating-excel-christin-boyd.aspx</link><pubDate>Tue, 07 Jul 2009 01:54:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9820860</guid><dc:creator>VSTO Team</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9820860.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9820860</wfw:commentRss><description>&lt;p&gt;A customer recently reported this bug when running their Shared Addin for Excel on French Windows.&amp;#160; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Error: 0x80028018 (-2147647512)      &lt;br /&gt;Description: Old Format or Invalid Type Library&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;His solution worked great on English Windows, but gave errors in any other language.&amp;#160; This is a known problem in Excel and there are a few workarounds that work depending on the way you’re writing your Excel Addin.&amp;#160;&amp;#160; Let me take you through the problem, variations on the problem, and different solutions depending on which Visual Studio project template you choose to start your Addin.&lt;/p&gt;  &lt;p&gt;The bug was originally documented in a &lt;a href="http://support.microsoft.com/kb/320369" target="_blank"&gt;KB 320369 article&lt;/a&gt;, which gives detailed repro steps, explanation, and two workarounds with sample code.&amp;#160; So why am I writing a blog post if the KB article covers everything?&amp;#160;&amp;#160; Three reasons.&amp;#160; &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Because we’re fixing the problem in CLR 4 and I want to encourage you to use one of the recommended workarounds in your current solutions so that you’re ready when your users upgrade to .NET Framework 4.&amp;#160; &lt;/li&gt;    &lt;li&gt;Also, there are parts of the KB article that are a bit confusing, so I’ll try to add some color commentary to help explain what’s causing the problem.&amp;#160; &lt;/li&gt;    &lt;li&gt;And third, these problems do not occur if you use VSTO 2005 SE, VSTO 3.0 (which ships with Visual Studio 2008), or Visual Studio 2010.&amp;#160; I’ll explain why and how later. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The KB article describes the problem:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Error: 0x80028018 (-2147647512)      &lt;br /&gt;Description: Old Format or Invalid Type Library&lt;/p&gt;    &lt;p&gt;You receive this error calling an Excel method when the following conditions are true: &lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;The method requires an LCID (locale identifier). &lt;/li&gt;      &lt;li&gt;You run an English version of Excel. However, the regional settings for the computer are configured for a non-English language. &lt;/li&gt;   &lt;/ul&gt;    &lt;p&gt;If the client computer runs the English version of Excel and the locale for the current user is configured for a language other than English, Excel will try to locate the language pack for the configured language. If the language pack is not found, the error is reported.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The quote from the KB article is accurate, but can be confusing.&amp;#160; It is very difficult to determine if the Excel method you want to call requires LCID or not.&amp;#160; The Primary Interop Assembly (PIA) does not indicate whether or not the LCID is needed, however VBA does not hide the need for LCID.&amp;#160; Part of the reason why Excel hasn’t changed its methods is to maintain back compatibility with all the VBA code in the universe.&amp;#160; &lt;/p&gt;  &lt;h3&gt;Fixed in VSTO&lt;/h3&gt;  &lt;p&gt;VSTO implemented a fix in VSTO 2005 Second Edition (SE).&amp;#160; You can read more about this fix in &lt;a href="http://blogs.msdn.com/eric_carter/archive/2005/06/15/429515.aspx" target="_blank"&gt;Eric Carter’s blog post&lt;/a&gt;.&amp;#160; The fix is also in all subsequent versions of Visual Studio 2008 and will be in Visual Studio 2010.&amp;#160; You know you are using “VSTO” when you create a new Project in Visual Studio and select an Excel &amp;lt;version number&amp;gt; Workbook, Excel &amp;lt;version number&amp;gt; Template or Excel &amp;lt;version number&amp;gt; Addin.&amp;#160; The fix was not implemented in the Shared Addin template in any version of Visual Studio.&amp;#160; If you create a WinForms, WPF, Web or console application that calls Excel, then you will see this bug on non-English Windows.&lt;/p&gt;  &lt;h3&gt;Workarounds &lt;/h3&gt;  &lt;p&gt;If you are using the Shared Addin template, a WinForm, WPF, Web or Console application with any version of Visual Studio, then you should use the &lt;a href="http://support.microsoft.com/kb/320369" target="_blank"&gt;KB 320369 article&lt;/a&gt; to solve the problem.&lt;/p&gt;  &lt;p&gt;The workaround is to write explicit calls to set the thread’s culture before calling into Excel.&amp;#160; You can then reset the culture back to what it was before after you are finished calling Excel.&amp;#160; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Install the Multilingual User Interface Pack for your version of Office. &lt;/li&gt;    &lt;li&gt;Execute the Excel method or property by using &lt;b&gt;InvokeMember&lt;/b&gt; so that you can specify the &lt;b&gt;CultureInfo&lt;/b&gt; for the call. For example, the following code illustrates how you can invoke the &lt;b&gt;Workbooks&lt;/b&gt; object &lt;b&gt;Add&lt;/b&gt; method with &amp;quot;en-US&amp;quot; as the &lt;b&gt;CultureInfo&lt;/b&gt;:       &lt;div id="codeSnippetWrapper" style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; background-color: #f4f4f4; text-align: left"&gt;       &lt;pre id="codeSnippet" 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;Dim&lt;/span&gt; oApp &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;New&lt;/span&gt; Excel.Application()&lt;br /&gt;oApp.Visible = &lt;span style="color: #0000ff"&gt;True&lt;/span&gt;&lt;br /&gt;oApp.UserControl = &lt;span style="color: #0000ff"&gt;True&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; oBooks &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Object&lt;/span&gt; = oApp.Workbooks&lt;br /&gt;&lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; ci &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; System.Globalization.CultureInfo = &lt;span style="color: #0000ff"&gt;New&lt;/span&gt; System.Globalization.CultureInfo(&lt;span style="color: #006080"&gt;&amp;quot;en-US&amp;quot;&lt;/span&gt;)&lt;br /&gt;oBooks.&lt;span style="color: #0000ff"&gt;GetType&lt;/span&gt;().InvokeMember(&lt;span style="color: #006080"&gt;&amp;quot;Add&amp;quot;&lt;/span&gt;, Reflection.BindingFlags.InvokeMethod, &lt;span style="color: #0000ff"&gt;Nothing&lt;/span&gt;, oBooks, &lt;span style="color: #0000ff"&gt;Nothing&lt;/span&gt;, ci)&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;

      &lt;br /&gt;&lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Or, instead of the above bullet and code sample, set the &lt;b&gt;CultureInfo&lt;/b&gt; prior to calling the Excel method, and then you can reset it after your Excel call: &lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
  &lt;div id="codeSnippetWrapper" style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; background-color: #f4f4f4; text-align: left"&gt;
    &lt;pre id="codeSnippet" 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;Dim&lt;/span&gt; oApp &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;New&lt;/span&gt; Excel.Application()&lt;br /&gt;oApp.Visible = &lt;span style="color: #0000ff"&gt;True&lt;/span&gt;&lt;br /&gt;oApp.UserControl = &lt;span style="color: #0000ff"&gt;True&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; oldCI &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; System.Globalization.CultureInfo = _&lt;br /&gt;    System.Threading.Thread.CurrentThread.CurrentCulture&lt;br /&gt;System.Threading.Thread.CurrentThread.CurrentCulture = _&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;New&lt;/span&gt; System.Globalization.CultureInfo(&lt;span style="color: #006080"&gt;&amp;quot;en-US&amp;quot;&lt;/span&gt;)&lt;br /&gt;oApp.Workbooks.Add()&lt;br /&gt;System.Threading.Thread.CurrentThread.CurrentCulture = oldCI&lt;/pre&gt;

    &lt;br /&gt;&lt;/div&gt;
&lt;/blockquote&gt;

&lt;p&gt;The .NET Framework 4 will solve this whole culture problem.&amp;#160; Excel is not going to change its culture sensitivity because of the need to support backwards compatibility.&amp;#160;&amp;#160; Starting with CLR 4.0, when managed code calls into a COM component and an LCID is required, then the CLR will pass LCID = 1033.&amp;#160; Note that this is how VBA passes LCIDs.&amp;#160;&amp;#160; This means that Visual Studio 2010 project templates for Excel Addins can stop wrapping all Excel projects with LCID proxy.&amp;#160;&amp;#160; In the future, when you use VS 2010 and .NET 4 to write your Excel automation programs from a Shared Addin, console, Winforms, WPF, or Web application, you won’t need to wrap your calls either.&amp;#160; &lt;/p&gt;

&lt;p&gt;-Christin Boyd, Program Manager &amp;amp; &lt;a href="http://blogs.msdn.com/mshneer/" target="_blank"&gt;Misha Shneerson&lt;/a&gt;, Senior Developer&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9820860" 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/Excel+2003/default.aspx">Excel 2003</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/primary+interop+assemblies/default.aspx">primary interop assemblies</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VB/default.aspx">VB</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VBA/default.aspx">VBA</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>Community Article: Automate Common Office Tasks (Beth Massi)</title><link>http://blogs.msdn.com/vsto/archive/2009/06/25/community-article-automate-common-office-tasks-beth-massi.aspx</link><pubDate>Fri, 26 Jun 2009 02:34:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9804476</guid><dc:creator>VSTO Team</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9804476.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9804476</wfw:commentRss><description>&lt;p&gt;If you haven’t seen it yet, we’ve got &lt;a href="http://msdn.microsoft.com/en-us/vsto/dd935909.aspx" target="_blank"&gt;a new article&lt;/a&gt; from &lt;a href="https://mvp.support.microsoft.com/profile=169AE602-45EF-47E6-8868-CA3E91D0A1EE"&gt;Robert Green&lt;/a&gt; (MVP) up on the &lt;a href="http://msdn.microsoft.com/en-us/vsto/default.aspx" target="_blank"&gt;VSTO Dev Center&lt;/a&gt;. In this article, learn how you can use Visual Studio to build application-level add-ins that automate common Microsoft Office tasks. It’s a good introduction to Office development with Visual Studio so check it out!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/vsto/dd935909.aspx" target="_blank"&gt;&lt;strong&gt;Create an Application-Level Add-In to Automate Common Office Tasks&lt;/strong&gt;&lt;/a&gt;&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=9804476" 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/Beth+Massi/default.aspx">Beth Massi</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/Community/default.aspx">Community</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+Development/default.aspx">Office Development</category></item><item><title>Video Interview: Mary Lee on Deploying Multiple Office Solutions (Kathleen McGrath)</title><link>http://blogs.msdn.com/vsto/archive/2009/06/04/video-interview-mary-lee-on-deploying-multiple-office-solutions-kathleen-mcgrath.aspx</link><pubDate>Fri, 05 Jun 2009 05:35:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9700647</guid><dc:creator>VSTO Team</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9700647.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9700647</wfw:commentRss><description>&lt;p&gt;Mary Lee recently posted a blog entry that describes &lt;a href="http://blogs.msdn.com/vsto/archive/2009/05/20/deploying-multiple-office-solutions-in-a-single-installer.aspx"&gt;Deploying Multiple Office Solutions in a Single Installer&lt;/a&gt;, complete with graphics to help you visualize the process. I recently interviewed Mary to learn more about this topic, and to have her give a demonstration of some of the tasks described in this post.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/VideoInterviewMaryLeeonDeployingMultiple_1136E/clip_image002_2.jpg"&gt;&lt;img style="border-right-width: 0px; margin: 0px 15px 0px 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="clip_image002" align="left" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/VideoInterviewMaryLeeonDeployingMultiple_1136E/clip_image002_thumb.jpg" width="72" height="72" /&gt;&lt;/a&gt;If you&amp;#8217;ve often wondered who&amp;#8217;s hidden behind that motorcycle helmet, be sure to check out the video!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;See video: &lt;a href="http://channel9.msdn.com/posts/kmcgrath/Deploying-Multiple-Office-Solutions-in-a-Single-ClickOnce-Installer/" target="_blank"&gt;Deploying Multiple Office Solutions in a Single ClickOnce Installer&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://channel9.msdn.com/posts/kmcgrath/Deploying-Multiple-Office-Solutions-in-a-Single-ClickOnce-Installer/"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="Multi" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/VideoInterviewMaryLeeonDeployingMultiple_1136E/Multi_1.png" width="467" height="351" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I will be posting additional interviews, demonstrations, and featured Visual Studio 2010 Beta 1 content on my blog: &lt;a href="http://blogs.msdn.com/kathleen"&gt;http://blogs.msdn.com/kathleen&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;-- Kathleen&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9700647" 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/Mary+Lee/default.aspx">Mary Lee</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Kathleen+McGrath/default.aspx">Kathleen McGrath</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VS2010/default.aspx">VS2010</category></item><item><title>Use a path that resolves anywhere your VSTO solution could be deployed (Christin Boyd)</title><link>http://blogs.msdn.com/vsto/archive/2009/06/04/use-a-path-that-resolves-anywhere-your-vsto-solution-could-be-deployed-christin-boyd.aspx</link><pubDate>Thu, 04 Jun 2009 23:29:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9700238</guid><dc:creator>VSTO Team</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9700238.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9700238</wfw:commentRss><description>&lt;p&gt;One of the VSTO MVPs pointed out that in some cases his customers were unable to resolve UNC paths consistently.&amp;#160; When he investigated further, he found that some branch offices of an enterprise were unable to resolve the UNC path (&lt;a href="file://\\myserver\myvstoapps\installpath\"&gt;\\myserver\myvstoapps\installpath\&lt;/a&gt;) because of the way they setup their network infrastructure.&amp;#160; The only workaround he could find was to use a fully qualified web URL instead of a UNC path.&amp;#160; The resolution was to create a web server internal to the corporation which is still accessible by people in the branch office.&amp;#160; The other option would be to negotiate with the IT staff to change the way the branch office resolves server names, but apparently that was not an option.&lt;/p&gt;  &lt;p&gt;We looked at the situation and agree with his conclusion about the workaround.&amp;#160; If the network just won’t give you the correct path using UNC, then HTTP is a reliable solution.&lt;/p&gt;  &lt;p&gt;-Christin Boyd, Program Manager&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9700238" 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/Deployment/default.aspx">Deployment</category></item><item><title>Do Your Outlook UI Elements Need Counseling? - Get your Form Regions, Ribbons, and Task Panes Talking to Each Other Again (Norm Estabrook)</title><link>http://blogs.msdn.com/vsto/archive/2009/06/03/do-your-outlook-ui-elements-need-counseling-get-your-form-regions-ribbons-and-task-panes-talking-to-each-other-again-norm-estabrook.aspx</link><pubDate>Thu, 04 Jun 2009 01:30:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9693769</guid><dc:creator>VSTO Team</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9693769.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9693769</wfw:commentRss><description>&lt;p&gt;So you want to open a task pane by using a button on the Ribbon. You also want a form region that appears in an e-mail item to detect the state of a control on a custom task pane so that you can add or remove an option that appears in a Ribbon menu right? Ok, I completely made this scenario up. But at some point, somewhere along the way, you might say to yourself – how do I get to that gallery on my Ribbon from my task pane? or how do I enable the user to populate that combo box on the form region by selecting a control on the Ribbon? Well if that describes something that you are trying to do, then this post is for you. Let’s start with Ribbons. The other two (form regions and task panes) are bit more troublesome.&lt;/p&gt;  &lt;h4&gt;Ribbons&lt;/h4&gt;  &lt;p&gt;Ribbon controls are the easiest to access from other areas of your application. Assuming that your custom Ribbon is named &lt;em&gt;Ribbon1&lt;/em&gt;, here is what you do:&lt;/p&gt;  &lt;p align="left"&gt;&lt;span style="color: #2b91af"&gt;ThisRibbonCollection &lt;/span&gt;ribbonCollection =    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #2b91af"&gt;Globals&lt;/span&gt;.Ribbons    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [&lt;span style="color: #2b91af"&gt;Globals&lt;/span&gt;.ThisAddIn.Application.ActiveInspector()];    &lt;br /&gt;ribbonCollection.Ribbon1.comboBox1.Text = &lt;span style="color: #a31515"&gt;&amp;quot;Hello World&amp;quot;&lt;/span&gt;;&lt;/p&gt;  &lt;p&gt;You can read more about this &lt;a href="http://msdn.microsoft.com/en-us/library/bb772088.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;h4&gt;Form Regions&lt;/h4&gt;  &lt;p&gt;For the VB folks, this is a snap. C# developers have to do a bit more work. That is because by default, in a C# project, the controls that you add to a form region are private. For each control that you want to access, you have to set the &lt;strong&gt;Modifiers&lt;/strong&gt; property of the control to &lt;strong&gt;Internal &lt;/strong&gt;or &lt;strong&gt;Public&lt;/strong&gt;. For example: &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/OutlookUICounselingGetyourFormRegionsRib_E1EA/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/OutlookUICounselingGetyourFormRegionsRib_E1EA/image_thumb.png" width="321" height="360" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can then add code to access the control. For example, assuming that your form region is named &lt;em&gt;FormRegion1&lt;/em&gt;, you could use the following code:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;WindowFormRegionCollection &lt;/span&gt;formRegions =
    &lt;span style="color: #2b91af"&gt;Globals&lt;/span&gt;.FormRegions
        [&lt;span style="color: #2b91af"&gt;Globals&lt;/span&gt;.ThisAddIn.Application.ActiveInspector()];
formRegions.FormRegion1.textBox1.Text = &lt;span style="color: #a31515"&gt;&amp;quot;Hello World&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

&lt;p&gt;You can read more about this &lt;a href="http://msdn.microsoft.com/en-us/library/bb772084.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;Custom Task Panes&lt;/h4&gt;

&lt;p&gt;Controls on task panes require the same tweaks described for form regions above.&amp;#160; Here is an example of how to get to a button on a task pane. This example makes the following assumptions:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;The user control of the custom task pane is named &lt;em&gt;MyUserControl&lt;/em&gt;. &lt;/li&gt;

  &lt;li&gt;The task pane is named &lt;em&gt;myCustomTaskPane&lt;/em&gt; and it is declared as public in your code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;((&lt;span style="color: #2b91af"&gt;MyUserControl&lt;/span&gt;)&lt;span style="color: #2b91af"&gt;Globals&lt;/span&gt;.ThisAddIn.myCustomTaskPane.Control).button1.Text = &lt;span style="color: #a31515"&gt;&amp;quot;It Worked&amp;quot;&lt;/span&gt;;&lt;/p&gt;

&lt;p&gt;If have not yet created a custom task pane, see &lt;a href="http://msdn.microsoft.com/en-us/library/aa942846.aspx"&gt;this topic&lt;/a&gt; and it will all make sense.&lt;/p&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;As a side note, if you are adding custom task panes to Outlook Inspector windows, you have to write a bit of code to map each Inspector window with it’s own instance of a custom task pane. If you don’t do this mapping, you get all kinds of wacky issues.&amp;#160; For an example of how to do this, see the following &lt;a href="http://msdn.microsoft.com/en-us/library/bb296010.aspx"&gt;article&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For the sake of being thorough, here is an example of how you can access a task pane created by using the guidance in that &lt;a href="http://msdn.microsoft.com/en-us/library/bb296010.aspx"&gt;article&lt;/a&gt;.&amp;#160; &lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;private void &lt;/span&gt;toggleButton1_Click(&lt;span style="color: blue"&gt;object &lt;/span&gt;sender, &lt;span style="color: #2b91af"&gt;RibbonControlEventArgs &lt;/span&gt;e)
{
    Outlook.&lt;span style="color: #2b91af"&gt;Inspector &lt;/span&gt;inspector = (Outlook.&lt;span style="color: #2b91af"&gt;Inspector&lt;/span&gt;)e.Control.Context;
    &lt;span style="color: #2b91af"&gt;InspectorWrapper &lt;/span&gt;inspectorWrapper = &lt;span style="color: #2b91af"&gt;Globals&lt;/span&gt;.ThisAddIn.InspectorWrappers[inspector];
    &lt;span style="color: #2b91af"&gt;CustomTaskPane &lt;/span&gt;taskPane = inspectorWrapper.CustomTaskPane;
    &lt;span style="color: blue"&gt;if &lt;/span&gt;(taskPane != &lt;span style="color: blue"&gt;null&lt;/span&gt;)
    {
        taskPane.Visible = ((&lt;span style="color: #2b91af"&gt;RibbonToggleButton&lt;/span&gt;)sender).Checked;
        taskPane.DockPosition = Microsoft.Office.Core.&lt;span style="color: #2b91af"&gt;MsoCTPDockPosition&lt;/span&gt;.msoCTPDockPositionBottom;
        taskPane.Height = 475;
    }
}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;Hope this helps!&lt;/p&gt;

&lt;p&gt;Norm E.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9693769" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Norm+Estabrook/default.aspx">Norm Estabrook</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Ribbon/default.aspx">Ribbon</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+2007/default.aspx">Office 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VS2008/default.aspx">VS2008</category><category domain="http://blogs.msdn.com/vsto/archive/tags/add-ins/default.aspx">add-ins</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+Development/default.aspx">Office Development</category></item><item><title>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>Sign up for Office 2010 Technical Preview</title><link>http://blogs.msdn.com/vsto/archive/2009/05/12/sign-up-for-office-2010-technical-preview.aspx</link><pubDate>Tue, 12 May 2009 20:36:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9607782</guid><dc:creator>VSTO Team</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9607782.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9607782</wfw:commentRss><description>&lt;p&gt;I’m at TechEd in LA, but it seems I could get just as much excitement just watching the Twittersphere today and watching #tela09 tags!&amp;#160; And my feet are killing me.&amp;#160; So be glad you’re sitting at your computer instead of walking around Los Angeles!&amp;#160; Let me give you some highlights for Office developers:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.msteched.com/online/home.aspx" target="_blank"&gt;Watch the Keynotes&lt;/a&gt; which include Office 2010 demos.&amp;#160; Also some &lt;a href="http://www.msteched.com/online/channels.aspx?cname=track&amp;amp;channel=Office+%26+SharePoint" target="_blank"&gt;interviews on Office and SharePoint&lt;/a&gt; on the same TechEd site.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.office2010themovie.com/" target="_blank"&gt;Office 2010 The Movie:&amp;#160; Countdown to Awesome&lt;/a&gt; is the new site where you can watch a slick video and more importantly, click the Sign up for the Microsoft Office 2010 Technology Preview.&amp;#160; When you click the link they show you the “fine print” which I will now print in large font:&lt;/p&gt;  &lt;h4&gt;By registering you are signing up to be considered for the Technical Preview Program, you will be &lt;strong&gt;waitlisted for consideration to be invited&lt;/strong&gt; into the Technical Preview Program. We will notify invitees in early to mid July.&lt;/h4&gt;  &lt;p&gt;“What does that mean?” you ask.&amp;#160; Well, it means that Microsoft wants to collect a wide variety of customer-types and ensure that our TechPreview covers all the different types of customers.&amp;#160; For example, the sign-up form asks if you will test the Tech Preview at Home or Work.&amp;#160; Be honest in your answer because we truly want to get perspectives from all types of Office users.&amp;#160; Similarly the survey asks the size of your company and if you read Japanese.&amp;#160; There is no trick to get invited.&amp;#160; &lt;/p&gt;  &lt;p&gt;If you don’t get invited, then don’t fret.&amp;#160; We’ll give you some useful information on this blog and other Office blogs to help you prepare your business for the future.&amp;#160; For now, I encourage you to build great solutions for Office using all of the resources at Microsoft including Visual Studio, VBA, Open XML SDK, code samples, Forum support, Code Gallery, and the &lt;a href="http://msdn.microsoft.com/office" target="_blank"&gt;Office Developer Center&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Sincerely, Christin Boyd, Program Manager&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9607782" 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/Office+2007/default.aspx">Office 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/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/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+2010/default.aspx">Office 2010</category></item></channel></rss>