<?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>Delay-loading the CLR in Office Add-ins</title><link>http://blogs.msdn.com/b/andreww/archive/2008/04/19/delay-loading-the-clr-in-office-add-ins.aspx</link><description>Suppose you control your enterprise desktops to the extent that you control which add-ins are installed. Suppose, further, that you want to avoid the hit of loading the CLR at application startup. One way is to delay-load your managed add-ins. The registered</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Delay-loading the CLR in Office Add-ins</title><link>http://blogs.msdn.com/b/andreww/archive/2008/04/19/delay-loading-the-clr-in-office-add-ins.aspx#9633392</link><pubDate>Thu, 21 May 2009 09:41:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9633392</guid><dc:creator>andreww</dc:creator><description>&lt;p&gt;gregc - it looks like you got an answer to your forum post. Just for completeness, the main problem was that your CommandBarButton.OnAction needed to be set to &amp;quot;!&amp;lt;ProgId_of_your_add-in&amp;gt;&amp;quot; - and it looks like you were'nt using the correct ProgId string value.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9633392" width="1" height="1"&gt;</description></item><item><title>re: Delay-loading the CLR in Office Add-ins</title><link>http://blogs.msdn.com/b/andreww/archive/2008/04/19/delay-loading-the-clr-in-office-add-ins.aspx#9609428</link><pubDate>Wed, 13 May 2009 18:19:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9609428</guid><dc:creator>gregc</dc:creator><description>&lt;p&gt;Andrew, Can you give me an idea of what is required to hook up the event handlers correctly in order to make this work or what some of the common mistakes are? &amp;nbsp;Some sample code would be great.&lt;/p&gt;
&lt;p&gt;I posted a question on this to the VSTO forum that has some more detail.&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/ee959b22-5a19-4afc-8895-ace32c3d0a22"&gt;http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/ee959b22-5a19-4afc-8895-ace32c3d0a22&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9609428" width="1" height="1"&gt;</description></item><item><title>re: Delay-loading the CLR in Office Add-ins</title><link>http://blogs.msdn.com/b/andreww/archive/2008/04/19/delay-loading-the-clr-in-office-add-ins.aspx#9608377</link><pubDate>Wed, 13 May 2009 02:25:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9608377</guid><dc:creator>andreww</dc:creator><description>&lt;p&gt;gregc - I never got a final response from Andrew, but not hooking up event handlers correctly is a common problem. &lt;/p&gt;
&lt;p&gt;The comment that was cut off was a trackback (these are always cut off, because they only show the beginning of the trackback post). The post that included the trackback is here: &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/andreww/archive/2008/07/14/demand-loading-vsto-add-ins.aspx"&gt;http://blogs.msdn.com/andreww/archive/2008/07/14/demand-loading-vsto-add-ins.aspx&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9608377" width="1" height="1"&gt;</description></item><item><title>re: Delay-loading the CLR in Office Add-ins</title><link>http://blogs.msdn.com/b/andreww/archive/2008/04/19/delay-loading-the-clr-in-office-add-ins.aspx#9607990</link><pubDate>Tue, 12 May 2009 22:29:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9607990</guid><dc:creator>gregc</dc:creator><description>&lt;p&gt;Andrew,I am very interested in the resolution of the discussion just above but your last post is cut off. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9607990" width="1" height="1"&gt;</description></item><item><title>Demand-Loading VSTO Add-ins</title><link>http://blogs.msdn.com/b/andreww/archive/2008/04/19/delay-loading-the-clr-in-office-add-ins.aspx#8732548</link><pubDate>Tue, 15 Jul 2008 06:27:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8732548</guid><dc:creator>Andrew Whitechapel</dc:creator><description>&lt;p&gt;In an earlier post , I talked about how you could delay (or prevent) the loading of managed code using&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8732548" width="1" height="1"&gt;</description></item><item><title>re: Delay-loading the CLR in Office Add-ins</title><link>http://blogs.msdn.com/b/andreww/archive/2008/04/19/delay-loading-the-clr-in-office-add-ins.aspx#8516532</link><pubDate>Sat, 17 May 2008 07:45:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8516532</guid><dc:creator>andreww</dc:creator><description>&lt;p&gt;Andrew - that should work. Are you sure you're hooking up the Click handler every time? &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8516532" width="1" height="1"&gt;</description></item><item><title>re: Delay-loading the CLR in Office Add-ins</title><link>http://blogs.msdn.com/b/andreww/archive/2008/04/19/delay-loading-the-clr-in-office-add-ins.aspx#8464279</link><pubDate>Wed, 07 May 2008 02:58:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8464279</guid><dc:creator>Andrew</dc:creator><description>&lt;p&gt;Forgot to say explicitly...yes, my managed add-in has a custom toolbar. So I want the first click on one of the buttons in the managed toolbar to load the add-in.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8464279" width="1" height="1"&gt;</description></item><item><title>re: Delay-loading the CLR in Office Add-ins</title><link>http://blogs.msdn.com/b/andreww/archive/2008/04/19/delay-loading-the-clr-in-office-add-ins.aspx#8464277</link><pubDate>Wed, 07 May 2008 02:57:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8464277</guid><dc:creator>Andrew</dc:creator><description>&lt;p&gt;I'm trying to avoid writing the native add-in. So I'm just relying on the 'demand-load' flags in the LoadBehavior setting. I was hoping that would cause my add-in to load on the first button press.&lt;/p&gt;
&lt;p&gt;I discovered that this works fine for the 2007 version of my add-in, but not for 2003.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8464277" width="1" height="1"&gt;</description></item><item><title>re: Delay-loading the CLR in Office Add-ins</title><link>http://blogs.msdn.com/b/andreww/archive/2008/04/19/delay-loading-the-clr-in-office-add-ins.aspx#8464235</link><pubDate>Wed, 07 May 2008 02:29:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8464235</guid><dc:creator>andreww</dc:creator><description>&lt;p&gt;Andrew - it's not clear what you're doing. Is it that you followed the explanation in my post and you have a native add-in with a custom toolbar that activates your managed add-in? &lt;/p&gt;
&lt;p&gt;Or, is it that you have only a managed add-in with a custom toolbar, and that you're relying on the inherent 'demand-load' LoadBehavior setting?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8464235" width="1" height="1"&gt;</description></item><item><title>re: Delay-loading the CLR in Office Add-ins</title><link>http://blogs.msdn.com/b/andreww/archive/2008/04/19/delay-loading-the-clr-in-office-add-ins.aspx#8447323</link><pubDate>Thu, 01 May 2008 20:40:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8447323</guid><dc:creator>Andrew</dc:creator><description>&lt;p&gt;Thanks for the article! I'd been wondering if this was possible.&lt;/p&gt;
&lt;p&gt;I'm able to get my toolbar to show up in Excel 2003 without the CLR loading on start-up (after changing the temporary argument to false when creating it), but it doesn't seem to be loading when I click a button.&lt;/p&gt;
&lt;p&gt;Do I need to change something else in my add-in to get the demand loading to work?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8447323" width="1" height="1"&gt;</description></item></channel></rss>