<?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>Ryan's Look at Outlook Programmability : Samples</title><link>http://blogs.msdn.com/rgregg/archive/tags/Samples/default.aspx</link><description>Tags: Samples</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Updated Samples for Outlook 2007 Developers</title><link>http://blogs.msdn.com/rgregg/archive/2007/02/14/updated-samples-for-outlook-2007-developers.aspx</link><pubDate>Wed, 14 Feb 2007 20:25:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1677620</guid><dc:creator>rgregg</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.msdn.com/rgregg/comments/1677620.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rgregg/commentrss.aspx?PostID=1677620</wfw:commentRss><wfw:comment>http://blogs.msdn.com/rgregg/rsscomments.aspx?PostID=1677620</wfw:comment><description>&lt;p&gt;Last week we uploaded revised versions of our sample code for Outlook 2007 add-ins.&amp;nbsp; The biggest change to these samples is that they are now provided as both a shared add-in project and VSTO 2005 SE project, so that you can see how add-in development would work using either technology.&lt;/p&gt; &lt;p&gt;These samples should give you a good basis for working with form regions, custom task panes, rules, the Table and PropertyAccessor objects, Ribbon extensibility and context menu customization.&lt;/p&gt; &lt;p&gt;You can download the latest samples from the following links:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb226712.aspx"&gt;Customizing the Ribbon in Outlook 2007&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb226710.aspx"&gt;Outlook 2007 Sample Add-ins: Rules Add-in, Travel Agency Add-in, and Prepare for Meeting Add-in&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1677620" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rgregg/archive/tags/Object+Model/default.aspx">Object Model</category><category domain="http://blogs.msdn.com/rgregg/archive/tags/Forms/default.aspx">Forms</category><category domain="http://blogs.msdn.com/rgregg/archive/tags/Samples/default.aspx">Samples</category></item><item><title>VSTO 2005 SE &amp; Outlook Form Regions</title><link>http://blogs.msdn.com/rgregg/archive/2006/11/27/vsto-2005-se-outlook-form-regions.aspx</link><pubDate>Tue, 28 Nov 2006 03:18:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1162669</guid><dc:creator>rgregg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/rgregg/comments/1162669.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rgregg/commentrss.aspx?PostID=1162669</wfw:commentRss><wfw:comment>http://blogs.msdn.com/rgregg/rsscomments.aspx?PostID=1162669</wfw:comment><description>&lt;p&gt;I just noticed that TQ posted a &lt;a href="http://blogs.msdn.com/tq/archive/2006/10/30/outlook-2007-form-region-sample.aspx"&gt;sample VSTO 2005 SE add-in&lt;/a&gt; for Outlook 2007 that implements form region handling.  I know a number of developers in the Outlook community have been looking for a good sample on how to build a VSTO add-in that uses form regions since simply implementing FormRegionStartup on the ThisAddin class doesn't work.  If you are struggling to figure out how to make this work, I'd encourage you to go over and take a look at his sample and implementation notes.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1162669" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rgregg/archive/tags/Forms/default.aspx">Forms</category><category domain="http://blogs.msdn.com/rgregg/archive/tags/Samples/default.aspx">Samples</category></item><item><title>Converting Bitmaps to IPictureDisp</title><link>http://blogs.msdn.com/rgregg/archive/2006/11/27/converting-bitmaps-to-ipicturedisp.aspx</link><pubDate>Tue, 28 Nov 2006 02:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1162222</guid><dc:creator>rgregg</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/rgregg/comments/1162222.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rgregg/commentrss.aspx?PostID=1162222</wfw:commentRss><wfw:comment>http://blogs.msdn.com/rgregg/rsscomments.aspx?PostID=1162222</wfw:comment><description>&lt;P&gt;If you're writing your Form Region solution in managed code, and you decide to provide the manifest information as a resource in the add-in, you'll need to return all of your icons for the form region in a format Outlook knows how to parse. Unfortunately, Outlook doesn't handle the managed code types &lt;EM&gt;System.Drawing.Bitmap&lt;/EM&gt; and &lt;EM&gt;System.Drawing.Icon&lt;/EM&gt; so you need to find some way to convert these types into something Outlook does understand. There have been a couple of examples of how to convert a Bitmap or Image to an &lt;EM&gt;IPictureDisp&lt;/EM&gt;, but I haven't found anything on how to make this work for &lt;EM&gt;Icon&lt;/EM&gt; and actually preserve the format as an Icon (without converting to Bitmap first).&amp;nbsp; Outlook is very picky about the type of &lt;EM&gt;IPictureDisp&lt;/EM&gt; objects it expects.&amp;nbsp; If you are providing an icon to be used in a view or window, you need to provide an &lt;EM&gt;IPictureDisp &lt;/EM&gt;with a subtype of Icon.&amp;nbsp; If you are providing an icon for the Ribbon, you should use a Bitmap subtype.&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://blogs.msdn.com/TQ/" mce_href="http://blogs.msdn.com/TQ/"&gt;Thomas Quinn&lt;/A&gt; on the VSTO team came up with two extremely useful class files that make this super easy: one for C# developers and one for VB.NET developers. Just add the code file to your project, and then call the &lt;EM&gt;PictureDispConverter.ToIPictureDisp()&lt;/EM&gt; and provide the &lt;EM&gt;Bitmap&lt;/EM&gt;, &lt;EM&gt;Image&lt;/EM&gt;, or &lt;EM&gt;Icon&lt;/EM&gt; object and the method returns an &lt;EM&gt;IPictureDisp&lt;/EM&gt; object you can send back to Outlook. The advantage to using this class is that it actually outputs different types of IPictureDisp based on the input format, so you don't need to convert an &lt;EM&gt;Icon&lt;/EM&gt; to a &lt;EM&gt;Bitmap&lt;/EM&gt; type first.&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://officeblogs.net/rgregg/PictureDispConverter.cs.txt" target=_blank mce_href="http://officeblogs.net/rgregg/PictureDispConverter.cs.txt"&gt;PictureDispConverter.cs&lt;/A&gt;&lt;BR&gt;&lt;A class="" href="http://officeblogs.net/rgregg/PictureDispConverter.vb.txt" target=_blank mce_href="http://officeblogs.net/rgregg/PictureDispConverter.vb.txt"&gt;PictureDispConverter.vb&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1162222" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rgregg/archive/tags/Forms/default.aspx">Forms</category><category domain="http://blogs.msdn.com/rgregg/archive/tags/Samples/default.aspx">Samples</category></item></channel></rss>