<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">NicolBlog</title><subtitle type="html">Nicola Delfino's blog</subtitle><id>http://blogs.msdn.com/nicold/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nicold/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/nicold/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2008-04-16T11:11:47Z</updated><entry><title>How to remove attachments from outlook (2007) emails easily</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nicold/archive/2009/10/22/how-to-remove-attachments-from-outlook-2007-emails-easily.aspx" /><id>http://blogs.msdn.com/nicold/archive/2009/10/22/how-to-remove-attachments-from-outlook-2007-emails-easily.aspx</id><published>2009-10-22T14:14:54Z</published><updated>2009-10-22T14:14:54Z</updated><content type="html">&lt;div&gt;I receive often emails with big attachment that fill my inbox space very quickly.    &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;On the other side, I usually like both to remove these attach and keep the email to preserve the thread for future use. Outlook 2007 don't have this feature so I wrote the following VBA function I added to a button on my client that resolve easily this task.&lt;/div&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div align="center"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/Howtoremoveattachmentsfromoutlook2007ema_A355/image_2.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/nicold/WindowsLiveWriter/Howtoremoveattachmentsfromoutlook2007ema_A355/image_thumb.png" width="177" height="65" /&gt;&lt;/a&gt; &lt;/div&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;&lt;a href="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/Howtoremoveattachmentsfromoutlook2007ema_A355/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/Howtoremoveattachmentsfromoutlook2007ema_A355/image_thumb_1.png" width="813" height="557" /&gt;&lt;/a&gt; &lt;/div&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;&lt;strong&gt;TIP&lt;/strong&gt;: You can select more message at once too. This is useful if you want to clear a big number of messages you already have archived.&lt;/div&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;Hope this helps!&lt;/div&gt;  &lt;div&gt;Nicola&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;&lt;strong&gt;Note&lt;/strong&gt;: I already developed this &lt;a class="class" href="http://blogs.msdn.com/nicold/archive/2006/06/15/632284.aspx" mce_href="http://blogs.msdn.com/nicold/archive/2006/06/15/632284.aspx"&gt;VBA for outlook 2003&lt;/a&gt;, but Outlook 2007 requires some small &lt;em&gt;update&lt;/em&gt;. following code should work.&lt;/div&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;UPDATE (09/06/09)&lt;/font&gt;&lt;/strong&gt;: Thanks to John Harvey and Patrick Philippot now the procedure save attachments in a specific folder and make good use of outlook memory:-) &lt;/div&gt;  &lt;div&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;UPDATE (22/10/09)&lt;/font&gt;&lt;/strong&gt;: Thanks to Steve Evans now it shows a link to folder where the attaches are saved &lt;/div&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;' by Nicola Delfino&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'       30-03-2005: First version&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'       26-11-2006: Updated for Outlook 2007&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'       28-11-2006: Updated with notes from rgreg&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'       09-06-2009: Saves the file(s) to a folder location (thanks to John Harvey and Patrick Philippot)&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'                   Memory problem with many attach to remove (FIXED) (thanks to John Harvey and Patrick Philippot)&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'       22-10-2009: Now it uses default &amp;quot;My document folder&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'                   added HTML and link to saved files (thanks to Steve Evans)&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'   based on code found at on http://www.outlookcode.com/&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;' Setup and instructions&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;' (1) Digitally sign VBA project&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'          start-&amp;gt;office-&amp;gt;Microsoft office tools-&amp;gt;digital certificates for VBA&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'          create a certificate&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;' (2) sign the code&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'          from Outlook -&amp;gt; menu -&amp;gt; Tools -&amp;gt; Macros -&amp;gt; Visual Basic Editor (VBA)&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'          project 1 -&amp;gt; Microsoft Office Outlook -&amp;gt; ThisOutlookSession (double ckick)&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'          * paste this source code *&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'          from Microsoft Visual Basic -&amp;gt; menu -&amp;gt; Tools -&amp;gt; digital signature -&amp;gt; (choose certificate previously created)&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;' (3) add icon on toolbar&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'          from outlook&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'          tools-&amp;gt;customize (select &amp;quot;Commands&amp;quot; TAB)&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'                add icon on toolbar&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'                [rearrange commands] to change icon and name on toolbar&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;' (4) be sure that tools-&amp;gt;macros-&amp;gt;security&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'               on &amp;quot;thrusted publishers&amp;quot; &amp;quot;trust all installed add-ins and templates&amp;quot; is checked&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;'&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;Private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Declare&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Function&lt;/span&gt; SHGetFolderPath &lt;span style="color: #0000ff"&gt;Lib&lt;/span&gt; &amp;quot;&lt;span style="color: #8b0000"&gt;shell32.dll&lt;/span&gt;&amp;quot; &lt;span style="color: #0000ff"&gt;Alias&lt;/span&gt; &amp;quot;&lt;span style="color: #8b0000"&gt;SHGetFolderPathA&lt;/span&gt;&amp;quot; ( _
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;ByVal&lt;/span&gt; HWnd &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Long&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;ByVal&lt;/span&gt; csidl &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Long&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;ByVal&lt;/span&gt; hToken &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Long&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;ByVal&lt;/span&gt; dwFlags &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Long&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;ByVal&lt;/span&gt; pszPath &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;String&lt;/span&gt;) &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Long&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;Private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Const&lt;/span&gt; MAX_PATH = 260&amp;amp;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;Public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Sub&lt;/span&gt; StripAttachments()
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; ilocation &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;String&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; objOL &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; Outlook.Application
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; objMsg &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Object&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; objAttachments &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; Outlook.Attachments
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; objSelection &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; Outlook.Selection
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; i &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Long&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; lngCount &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Long&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; strFile &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;String&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; strFolder &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;String&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; result
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #008000"&gt;'Put in the folder location you want to save attachments to&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    ilocation = GetSpecialFolder(&amp;amp;H5) &amp;amp; &amp;quot;&lt;span style="color: #8b0000"&gt;\Removed Attachs\&amp;quot; ' CSIDL_MY_DOCUMENTS As Long = &amp;amp;H5&lt;/span&gt;&amp;quot;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;On&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Error&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Resume&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Next&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    result = MsgBox(&amp;quot;&lt;span style="color: #8b0000"&gt;Do you want to remove attachments from selected email(s)?&lt;/span&gt;&amp;quot;, vbYesNo + vbQuestion)
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;If&lt;/span&gt; result = vbNo &lt;span style="color: #0000ff"&gt;Then&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        &lt;span style="color: #0000ff"&gt;Exit&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Sub&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;If&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #008000"&gt;' Instantiate an Outlook Application object.&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #008000"&gt;' Set objOL = CreateObject(&amp;quot;Outlook.Application&amp;quot;)&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Set&lt;/span&gt; objOL = Application
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #008000"&gt;' Get the collection of selected objects.&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Set&lt;/span&gt; objSelection = objOL.ActiveExplorer.Selection
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #008000"&gt;' Check each selected item for attachments.&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #008000"&gt;' If attachments exist, save them to the Temp&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #008000"&gt;' folder and strip them from the item.&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;For&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Each&lt;/span&gt; objMsg &lt;span style="color: #0000ff"&gt;In&lt;/span&gt; objSelection
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        &lt;span style="color: #008000"&gt;' This code only strips attachments from mail items.&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        &lt;span style="color: #0000ff"&gt;If&lt;/span&gt; objMsg.&lt;span style="color: #0000ff"&gt;Class&lt;/span&gt; = olMail &lt;span style="color: #0000ff"&gt;Then&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            &lt;span style="color: #008000"&gt;' Get the Attachments collection of the item.&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            &lt;span style="color: #0000ff"&gt;Set&lt;/span&gt; objAttachments = objMsg.Attachments
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            lngCount = objAttachments.Count
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            &lt;span style="color: #0000ff"&gt;If&lt;/span&gt; lngCount &amp;gt; 0 &lt;span style="color: #0000ff"&gt;Then&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                &lt;span style="color: #008000"&gt;' We need to use a count down loop for&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                &lt;span style="color: #008000"&gt;' removing items from a collection. Otherwise,&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                &lt;span style="color: #008000"&gt;' the loop counter gets confused and only every&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                &lt;span style="color: #008000"&gt;' other item is removed.&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                strFile = &amp;quot;&lt;span style="color: #8b0000"&gt;&lt;/span&gt;&amp;quot;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                &lt;span style="color: #0000ff"&gt;For&lt;/span&gt; i = lngCount &lt;span style="color: #0000ff"&gt;To&lt;/span&gt; 1 &lt;span style="color: #0000ff"&gt;Step&lt;/span&gt; -1
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                    &lt;span style="color: #008000"&gt;' Save attachment before deleting from item.&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                    &lt;span style="color: #008000"&gt;' Get the file name.&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                    
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                    &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; strHTML &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;String&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                    strHTML = &amp;quot;&lt;span style="color: #8b0000"&gt;&amp;lt;li&amp;gt;&amp;lt;a href=&lt;/span&gt;&amp;quot; &amp;amp; Chr(34) &amp;amp; &amp;quot;&lt;span style="color: #8b0000"&gt;file:&lt;/span&gt;&amp;quot; &amp;amp; ilocation &amp;amp; objAttachments.Item(i).FileName &amp;amp; Chr(34) &amp;amp; &amp;quot;&lt;span style="color: #8b0000"&gt;&amp;gt;&lt;/span&gt;&amp;quot; &amp;amp; objAttachments.Item(i).FileName &amp;amp; &amp;quot;&lt;span style="color: #8b0000"&gt;&amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;&lt;/span&gt;&amp;quot; &amp;amp; vbCrLf
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                                        
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                    strFile = strFile &amp;amp; strHTML
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;           
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                    
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                    &lt;span style="color: #008000"&gt;' Save the attachment as a file.&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                    objAttachments.Item(i).SaveAsFile (ilocation &amp;amp; objAttachments.Item(i))
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                    
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                    &lt;span style="color: #008000"&gt;' Save the attachment as a file.&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                    objAttachments.Item(i).Delete
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                &lt;span style="color: #0000ff"&gt;Next&lt;/span&gt; i
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                strFile = &amp;quot;&lt;span style="color: #8b0000"&gt;Attachment removed from the message and backup-ed to[&amp;lt;a href='&lt;/span&gt;&amp;quot; &amp;amp; ilocation &amp;amp; &amp;quot;&lt;span style="color: #8b0000"&gt;'&amp;gt;&lt;/span&gt;&amp;quot; &amp;amp; ilocation &amp;amp; &amp;quot;&lt;span style="color: #8b0000"&gt;&amp;lt;/a&amp;gt;]:&amp;lt;br&amp;gt;&amp;lt;ul&amp;gt;&lt;/span&gt;&amp;quot; &amp;amp; strFile &amp;amp; &amp;quot;&lt;span style="color: #8b0000"&gt;&amp;lt;/ul&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/span&gt;&amp;quot; &amp;amp; vbCrLf &amp;amp; vbCrLf
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; objDoc &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Object&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; objInsp &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; Outlook.Inspector
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                &lt;span style="color: #0000ff"&gt;Set&lt;/span&gt; objInsp = objMsg.GetInspector
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                &lt;span style="color: #0000ff"&gt;Set&lt;/span&gt; objDoc = objInsp.WordEditor
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                objDoc.Characters(1).InsertBefore strFile
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                objMsg.HTMLBody = strFile + objMsg.HTMLBody
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                &lt;span style="color: #0000ff"&gt;Set&lt;/span&gt; objInsp = &lt;span style="color: #0000ff"&gt;Nothing&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                &lt;span style="color: #0000ff"&gt;Set&lt;/span&gt; objDoc = &lt;span style="color: #0000ff"&gt;Nothing&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;If&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            strFile = strFile &amp;amp; vbCrLf &amp;amp; vbCrLf
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            objMsg.Save
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;If&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Next&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;ExitSub:
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Set&lt;/span&gt; objAttachments = &lt;span style="color: #0000ff"&gt;Nothing&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Set&lt;/span&gt; objMsg = &lt;span style="color: #0000ff"&gt;Nothing&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Set&lt;/span&gt; objSelection = &lt;span style="color: #0000ff"&gt;Nothing&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Set&lt;/span&gt; objOL = &lt;span style="color: #0000ff"&gt;Nothing&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Sub&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;Public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Function&lt;/span&gt; GetSpecialFolder(FolderCSIDL &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Long&lt;/span&gt;) &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;String&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; HWnd &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Long&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; Path &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;String&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; Res &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Long&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; ErrNumber &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Long&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; ErrText &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;String&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    Path = &lt;span style="color: #0000ff"&gt;String&lt;/span&gt;$(MAX_PATH, vbNullChar)
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #008000"&gt;''''''''''''''''''''''''''''''''''''''''''''&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #008000"&gt;' get the folder name&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #008000"&gt;''''''''''''''''''''''''''''''''''''''''''''&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    Res = SHGetFolderPath(HWnd:=0&amp;amp;, _
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                            csidl:=FolderCSIDL, _
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                            hToken:=0&amp;amp;, _
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                            dwFlags:=0&amp;amp;, _
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                            pszPath:=Path)
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Select&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Case&lt;/span&gt; Res
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        &lt;span style="color: #0000ff"&gt;Case&lt;/span&gt; S_OK
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            Path = TrimToNull(Text:=Path)
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            GetSpecialFolder = Path
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        &lt;span style="color: #0000ff"&gt;Case&lt;/span&gt; S_FALSE
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            MsgBox &amp;quot;&lt;span style="color: #8b0000"&gt;The folder code is valid but the folder does not exist.&lt;/span&gt;&amp;quot;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            GetSpecialFolder = vbNullString
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        &lt;span style="color: #0000ff"&gt;Case&lt;/span&gt; E_INVALIDARG
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            MsgBox &amp;quot;&lt;span style="color: #8b0000"&gt;The value of FolderCSIDL is not valid.&lt;/span&gt;&amp;quot;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            GetSpecialFolder = vbNullString
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        &lt;span style="color: #0000ff"&gt;Case&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Else&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            ErrNumber = Err.LastDllError
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            ErrText = &amp;quot;&lt;span style="color: #8b0000"&gt;ERROR!&lt;/span&gt;&amp;quot;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            MsgBox &amp;quot;&lt;span style="color: #8b0000"&gt;An error occurred.&lt;/span&gt;&amp;quot; &amp;amp; vbCrLf &amp;amp; _
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                &amp;quot;&lt;span style="color: #8b0000"&gt;System Error: &lt;/span&gt;&amp;quot; &amp;amp; &lt;span style="color: #0000ff"&gt;CStr&lt;/span&gt;(ErrNumber) &amp;amp; vbCrLf &amp;amp; _
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                &amp;quot;&lt;span style="color: #8b0000"&gt;Description:  &lt;/span&gt;&amp;quot; &amp;amp; ErrText
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Select&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Function&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;Public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Function&lt;/span&gt; TrimToNull(Text &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;String&lt;/span&gt;) &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;String&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; N &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Long&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    N = InStr(1, Text, vbNullChar)
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;If&lt;/span&gt; N &lt;span style="color: #0000ff"&gt;Then&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        TrimToNull = Left(Text, N - 1)
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;Else&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        TrimToNull = Text
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;If&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Function&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;






.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;div&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9911375" width="1" height="1"&gt;</content><author><name>NicolD</name><uri>http://blogs.msdn.com/members/NicolD.aspx</uri></author></entry><entry><title>NicolTIP#007: What to do when you no longer can run macros in Outlook 2007</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nicold/archive/2009/06/09/nicoltip-007-what-to-do-when-you-no-longer-can-run-macros-in-outlook-2007.aspx" /><id>http://blogs.msdn.com/nicold/archive/2009/06/09/nicoltip-007-what-to-do-when-you-no-longer-can-run-macros-in-outlook-2007.aspx</id><published>2009-06-09T16:49:26Z</published><updated>2009-06-09T16:49:26Z</updated><content type="html">&lt;p&gt;I am quoting information from [&lt;a href="http://blog.tjitjing.com/index.php/2007/03/things-i-can-and-cannot-get-to-work-in.html]"&gt;http://blog.tjitjing.com/index.php/2007/03/things-i-can-and-cannot-get-to-work-in.html]&lt;/a&gt; because I tumbled in this issue and forgot to &amp;quot;&lt;em&gt;just&lt;/em&gt;&amp;quot; restart Outlook :^) &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Whenever I went in to Tools - Macro - Macros, selected my macro and hit run I would end up in the Visual Basic editor with an error message saying “The macros in this project are disabled. Please refer to the online help or documentation of the host application to determine how to enable macros.”        &lt;br /&gt;I went in to Tools - Macro - Macro Security and first changed from the default “Warnings for signed macros; all unsigned macros are disabled” to “Warnings for all macros” and finally to “No security check for macros” but I still could not get the macros to run.        &lt;br /&gt;In spite of a lot of Googling I found nothing. Then I realized I hadn’t tried trick no 1 in the book: &lt;strong&gt;&lt;font color="#ff0000"&gt;Restart Outlook. And of course that was the solution&lt;/font&gt;&lt;/strong&gt;.&amp;#160; &lt;br /&gt;(Note to Microsoft: Please add a “Outlook needs to be restarted” message. Note to myself: Don’t be so stupid next time around) &lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;A good thing in Outlook 2007 is that I no longer get the “A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this? … Allow for x minutes”. I assume they have gotten rid of this annoying message and replaced with some security feature that does not require user intervention.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9716061" width="1" height="1"&gt;</content><author><name>NicolD</name><uri>http://blogs.msdn.com/members/NicolD.aspx</uri></author><category term="outlook" scheme="http://blogs.msdn.com/nicold/archive/tags/outlook/default.aspx" /><category term="attachment" scheme="http://blogs.msdn.com/nicold/archive/tags/attachment/default.aspx" /><category term="security" scheme="http://blogs.msdn.com/nicold/archive/tags/security/default.aspx" /><category term="email" scheme="http://blogs.msdn.com/nicold/archive/tags/email/default.aspx" /><category term="macro" scheme="http://blogs.msdn.com/nicold/archive/tags/macro/default.aspx" /></entry><entry><title>NicolTIP#006: how to show previous and next item using LINQ</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nicold/archive/2009/06/03/nicoltip-006-how-to-show-previous-and-next-item-using-linq.aspx" /><id>http://blogs.msdn.com/nicold/archive/2009/06/03/nicoltip-006-how-to-show-previous-and-next-item-using-linq.aspx</id><published>2009-06-03T17:04:58Z</published><updated>2009-06-03T17:04:58Z</updated><content type="html">&lt;p&gt;I had a table on SQL 2005 I am accessing it via LINQ. I had to select an item via a “where” condition (see below).&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;var item = (from snap in adc.Snapshots     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; where snap.file == image      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; select snap).First();&lt;/font&gt;&lt;/p&gt; &lt;!--CRLF--&gt;  &lt;p&gt;The problem was that I needed to identify the previous item and the next item too because we had to show them on a web page. Talking with some collgues of mine we found the following way that looks quite smart:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;var previous = adc.Snapshots.OrderByDescending(s =&amp;gt; s.InsertDateTime).Where(s =&amp;gt; string.Compare(s.file, image) &amp;lt; 0).FirstOrDefault();      &lt;br /&gt;var item = adc.Snapshots.OrderBy(s =&amp;gt; s.InsertDateTime).Where(s =&amp;gt; s.file == image).SingleOrDefault();       &lt;br /&gt;var next = adc.Snapshots.OrderBy(s =&amp;gt; s.InsertDateTime).Where(s =&amp;gt; string.Compare(s.file, image) &amp;gt; 0).FirstOrDefault();&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9691302" width="1" height="1"&gt;</content><author><name>NicolD</name><uri>http://blogs.msdn.com/members/NicolD.aspx</uri></author><category term="c#" scheme="http://blogs.msdn.com/nicold/archive/tags/c_2300_/default.aspx" /><category term="LINQ" scheme="http://blogs.msdn.com/nicold/archive/tags/LINQ/default.aspx" /></entry><entry><title>NicolTIP#005: How to show the same content in two ore more positions using master page in ASP.NET</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nicold/archive/2009/03/08/nicoltip-005-how-to-show-the-same-content-in-two-ore-more-positions-using-master-page-in-asp-net.aspx" /><id>http://blogs.msdn.com/nicold/archive/2009/03/08/nicoltip-005-how-to-show-the-same-content-in-two-ore-more-positions-using-master-page-in-asp-net.aspx</id><published>2009-03-08T14:47:39Z</published><updated>2009-03-08T14:47:39Z</updated><content type="html">&lt;p&gt;To write a web site and give to the entire site a coherent “look” with ASP.NET and master pages is very easy and productive. In brief, into the master page you need to put “placeholders” using the tag &amp;lt;asp:ContentPlaceHolder/&amp;gt; and into the content page, you can map real content with contenplaces (&lt;a href="http://msdn.microsoft.com/en-us/library/wtxbf3hh.aspx" target="_blank"&gt;more information&lt;/a&gt;).&lt;/p&gt;  &lt;p&gt;Sometime can be required to put the same content in more places, an example is the “title” field that you could put both in the header\title field and into a H1 tag into the body.&lt;/p&gt;  &lt;p&gt;This means, starting from the following content page:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;&amp;lt;%@ Page Title=&amp;quot;&amp;quot; Language=&amp;quot;C#&amp;quot; MasterPageFile=&amp;quot;~/MasterPages/Root.Master&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot; %&amp;gt;        &lt;br /&gt;&amp;lt;asp:Content ID=&amp;quot;Content1&amp;quot; ContentPlaceHolderID=&amp;quot;Title&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;font color="#ff0000"&gt;This is my title&lt;/font&gt;&amp;lt;/asp:Content&amp;gt;         &lt;br /&gt;&amp;lt;asp:Content ID=&amp;quot;Content2&amp;quot; ContentPlaceHolderID=&amp;quot;MyContent&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;font color="#008000"&gt;This is my content&lt;/font&gt;&amp;lt;/asp:Content&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;To obtain the following html output:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;&amp;lt;html&amp;gt;        &lt;br /&gt;&amp;lt;head&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;title&amp;gt;&lt;font color="#ff0000"&gt;This is my title&lt;/font&gt;&amp;lt;/title&amp;gt;         &lt;br /&gt;&amp;lt;/head&amp;gt;         &lt;br /&gt;&amp;lt;body&amp;gt;         &lt;br /&gt;&amp;lt;h1&amp;gt;&lt;font color="#ff0000"&gt;This is my title&lt;/font&gt;&amp;lt;/h1&amp;gt;         &lt;br /&gt;&lt;font color="#008000"&gt;This is my content&lt;/font&gt;         &lt;br /&gt;&amp;lt;/body&amp;gt;         &lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The easy way I found is shown in the following master page:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;&amp;lt;%@ Master Language=&amp;quot;C#&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot; CodeBehind=&amp;quot;Root.master.cs&amp;quot; Inherits=&amp;quot;NicolD.MasterPages.Root&amp;quot; %&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New"&gt;&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;        &lt;br /&gt;&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot; &amp;gt;         &lt;br /&gt;&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;title&amp;gt;&lt;font color="#ff0000"&gt;&amp;lt;asp:ContentPlaceHolder id=&amp;quot;Title&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/asp:ContentPlaceHolder&amp;gt;&lt;/font&gt;&amp;lt;/title&amp;gt;         &lt;br /&gt;&amp;lt;/head&amp;gt;         &lt;br /&gt;&amp;lt;body&amp;gt;         &lt;br /&gt;&amp;lt;h1&amp;gt;&lt;font color="#0000ff"&gt;&amp;lt;span id=&amp;quot;TitleOnPage&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/font&gt;&amp;lt;/h1&amp;gt;         &lt;br /&gt;&lt;font color="#008000"&gt;&amp;lt;asp:ContentPlaceHolder id=&amp;quot;MyContent&amp;quot; runat=&amp;quot;server&amp;quot; Visible=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;/asp:ContentPlaceHolder&amp;gt;&lt;/font&gt;         &lt;br /&gt;&amp;lt;/body&amp;gt;         &lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;the true secret is in the master page’s code behind:-), where I filled “TitleOnPage” with “Title” place holder content.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;public partial class Root : System.Web.UI.MasterPage        &lt;br /&gt;{         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; protected override void OnInit(EventArgs e)         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; base.OnInit(e); &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; this.Page.LoadComplete += new EventHandler(Page_LoadComplete);        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; private void Page_LoadComplete(object sender, EventArgs e)        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {         &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; LiteralControl lc = (LiteralControl)Title.Controls[0];          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TitleOnPage.InnerText = lc.Text;&lt;/font&gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New"&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9465578" width="1" height="1"&gt;</content><author><name>NicolD</name><uri>http://blogs.msdn.com/members/NicolD.aspx</uri></author><category term=".NET" scheme="http://blogs.msdn.com/nicold/archive/tags/.NET/default.aspx" /><category term="NicolTIP" scheme="http://blogs.msdn.com/nicold/archive/tags/NicolTIP/default.aspx" /><category term="ContentPlaceHolder" scheme="http://blogs.msdn.com/nicold/archive/tags/ContentPlaceHolder/default.aspx" /><category term="master page" scheme="http://blogs.msdn.com/nicold/archive/tags/master+page/default.aspx" /></entry><entry><title>NicolTIP#004: seven new keyboard shortcuts for Window 7</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nicold/archive/2009/02/26/nicoltip-004-seven-new-keyboard-shortcuts-for-window-7.aspx" /><id>http://blogs.msdn.com/nicold/archive/2009/02/26/nicoltip-004-seven-new-keyboard-shortcuts-for-window-7.aspx</id><published>2009-02-26T12:43:29Z</published><updated>2009-02-26T12:43:29Z</updated><content type="html">&lt;p&gt;I love keyboard shortcuts and W7 add some new really cool…&lt;/p&gt;  &lt;p&gt;&lt;a name="Tip1"&gt;&lt;b&gt;Managing Your Windows&lt;/b&gt;&lt;/a&gt;. Windows 7 simplifies document and program management by allowing you to “dock” a window or manipulate its size with one mouse maneuver or a simple keystroke. To dock your window on one half of the screen, drag it to the left or right and it will change its size to fit that half of the screen. To manipulate the vertical size of a window, you can drag the window to the top to maximize it, or double-click the window’s top or bottom border to maximize it vertically while keeping the same width. &lt;/p&gt;  &lt;p&gt;You can also perform all of these functions with keystrokes: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;Windos key+Left Arrow&lt;/b&gt; and &lt;b&gt;Windos key&lt;/b&gt;&lt;b&gt;+Right Arrow&lt;/b&gt; dock to half the screen &lt;/li&gt;    &lt;li&gt;&lt;b&gt;&lt;b&gt;Windos key&lt;/b&gt;+Up Arrow&lt;/b&gt; and &lt;b&gt;&lt;b&gt;Windos key&lt;/b&gt;+ Down Arrow&lt;/b&gt; maximize and minimize &lt;/li&gt;    &lt;li&gt;&lt;b&gt;&lt;b&gt;Windos key&lt;/b&gt;+Shift+Up Arrow&lt;/b&gt; and &lt;b&gt;&lt;b&gt;Windos key&lt;/b&gt;+Shift+Down Arrow&lt;/b&gt; maximize &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;and restore vertical size.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a name="Tip2"&gt;&lt;b&gt;Multi-Monitor Window Management.&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;/b&gt;Windows 7 makes using multiple monitors as convenient as it should be. When you’re working multi-monitor, use the keyboard shortcuts &lt;b&gt;&lt;b&gt;Windos key&lt;/b&gt;+Shift+Left Arrow&lt;/b&gt; and &lt;b&gt;&lt;b&gt;Windos key&lt;/b&gt;+Shift+Right Arrow&lt;/b&gt; to move windows from one monitor to another. The rearranged window will keep its relative position to the top-left origin on the new monitor.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a name="Tip3"&gt;&lt;b&gt;Project Your Display With Ease.&lt;/b&gt;&lt;/a&gt; Plugging in a projector and projecting your display is a snap with the Windows 7 driver display utility, &lt;b&gt;displayswitch.exe&lt;/b&gt;. Simply hit &lt;b&gt;&lt;b&gt;Windos key&lt;/b&gt;+P&lt;/b&gt; and you’ll be rewarded with the following easy-to-navigate pop-up window. By hitting your arrow keys (or &lt;b&gt;Windos key&lt;/b&gt;&lt;b&gt;+P&lt;/b&gt;) you can switch through multiple display settings, such as “clone”, “extend” or “external only”.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a name="Tip4"&gt;&lt;b&gt;Live Clutter-Free.&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;/b&gt;We live with enough clutter in our lives. Windows 7 gets rid of all the superfluous windows behind your active window. Just hit &lt;b&gt;&lt;b&gt;Windos key&lt;/b&gt;+Home&lt;/b&gt; to minimize all inactive windows. To restore the windows when you’d like them, just press&lt;strong&gt;:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;&lt;b&gt;Windos key&lt;/b&gt;+Home again&lt;/b&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a name="Tip5"&gt;&lt;b&gt;Help the Help Desk Help You.&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;/b&gt;Solving problems unique to a machine can be an arduous task for both the end-user and the help desk. That’s why Windows 7 introduces the Problem Steps Recorder, a screen-capture tool that allows the end-user to record the problems they’re having step-by-step. It’s as simple as hitting “record” then adding in comments as needed. A HTML-based file is converted to a .ZIP folder, which is easily passed on to the help desk. The program is accessible from the Control Panel under “Record steps to reproduce a problem” or run &lt;b&gt;psr.exe&lt;/b&gt; from Explorer.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a name="Tip6"&gt;&lt;b&gt;Aero Peek Your Desktop.&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;/b&gt;A lesser-known versatile tool on the taskbar introduced with Windows 7 is the Windows&lt;sup&gt;®&lt;/sup&gt; Aero&lt;sup&gt;®&lt;/sup&gt; feature, “Aero Peek” – the small rectangle in the lower right hand corner. It allows you to peek at any of the icons or gadgets on your desktop. The keyboard shortcut &lt;b&gt;&lt;b&gt;Windos key&lt;/b&gt;+Space&lt;/b&gt; performs the same function.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a name="Tip7"&gt;&lt;b&gt;Shuffling Through Program Windows.&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;/b&gt;If you’re running a number of files from the same program, such as multiple documents in Microsoft Word, Windows 7 allows you to switch through these windows with ease. Simply hold down the &lt;b&gt;Ctrl&lt;/b&gt; key while repeatedly clicking the icon from the taskbar. Each click will change the window to the next in the sequence, in the order that you opened them.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9446129" width="1" height="1"&gt;</content><author><name>NicolD</name><uri>http://blogs.msdn.com/members/NicolD.aspx</uri></author><category term="NicolTIP" scheme="http://blogs.msdn.com/nicold/archive/tags/NicolTIP/default.aspx" /><category term="Window 7" scheme="http://blogs.msdn.com/nicold/archive/tags/Window+7/default.aspx" /><category term="Shortcut" scheme="http://blogs.msdn.com/nicold/archive/tags/Shortcut/default.aspx" /><category term="Keyboard" scheme="http://blogs.msdn.com/nicold/archive/tags/Keyboard/default.aspx" /></entry><entry><title>NicolTIP#003: How to install Windows SharePoint Services 3.0 Tools - Visual Studio 2008 Extensions, Version 1.2 on Windows Vista</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nicold/archive/2009/02/17/nicoltip003-how-to-install-windows-sharepoint-services-3-0-tools-visual-studio-2008-extensions-version-1-2-on-windows-vista.aspx" /><id>http://blogs.msdn.com/nicold/archive/2009/02/17/nicoltip003-how-to-install-windows-sharepoint-services-3-0-tools-visual-studio-2008-extensions-version-1-2-on-windows-vista.aspx</id><published>2009-02-17T14:46:36Z</published><updated>2009-02-17T14:46:36Z</updated><content type="html">&lt;p&gt;If you try to install &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=7bf65b28-06e2-4e87-9bad-086e32185e68" target="_blank"&gt;Windows SharePoint Services 3.0 Tools - Visual Studio 2008 Extensions, Version 1.2&lt;/a&gt; on Windows Vista, you will get an error message telling you that you have to install Windows SharePoint Services 3.0 in order to install the tools. Windows SharePoint Services 3.0 (WSS 3.0) doesn't support non Windows Servers OS, so it's not possible to install WSS 3.0 on Windows Vista, which means you will not be able to install VS 2008 Extensions on your development machine.&lt;/p&gt;  &lt;p&gt;This happens because setup just checks on the registry the presence of a specific key. To avoid this behavior and install these extensions on Vista (but should work on XP as well) just write the following key on your machine registry:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0]      &lt;br /&gt;&lt;em&gt;&amp;quot;Sharepoint&amp;quot;=&amp;quot;Installed&amp;quot;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9427471" width="1" height="1"&gt;</content><author><name>NicolD</name><uri>http://blogs.msdn.com/members/NicolD.aspx</uri></author><category term="Visual Studio" scheme="http://blogs.msdn.com/nicold/archive/tags/Visual+Studio/default.aspx" /><category term="NicolTIP" scheme="http://blogs.msdn.com/nicold/archive/tags/NicolTIP/default.aspx" /><category term="MOSS" scheme="http://blogs.msdn.com/nicold/archive/tags/MOSS/default.aspx" /><category term="Registry" scheme="http://blogs.msdn.com/nicold/archive/tags/Registry/default.aspx" /><category term="Sharepoint" scheme="http://blogs.msdn.com/nicold/archive/tags/Sharepoint/default.aspx" /></entry><entry><title>NicolTIP#002: Create a manifest.xml extracting content type(s) and columns from a site using Sharepoint Designer</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nicold/archive/2009/02/15/nicoltip-002-create-a-manifest-xml-extracting-content-type-s-and-columns-from-a-site-using-sharepoint-designer.aspx" /><id>http://blogs.msdn.com/nicold/archive/2009/02/15/nicoltip-002-create-a-manifest-xml-extracting-content-type-s-and-columns-from-a-site-using-sharepoint-designer.aspx</id><published>2009-02-15T18:55:43Z</published><updated>2009-02-15T18:55:43Z</updated><content type="html">&lt;p&gt;Step to extract a content type and columns to CAML (XML)&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Create you content type and columns in the web UI. &lt;/li&gt;    &lt;li&gt;Create a list/library item using you new content type. &lt;/li&gt;    &lt;li&gt;Load up &lt;strong&gt;Sharepoint Designer &lt;/strong&gt;to the site where you created you item. &lt;/li&gt;    &lt;li&gt;From the File menu, click &lt;strong&gt;Export -&amp;gt; Personal Web Package&lt;/strong&gt;. &lt;/li&gt;    &lt;li&gt;In the export web package window select the list/library where your create the item using the new content type and click &lt;strong&gt;add&lt;/strong&gt;. &lt;/li&gt;    &lt;li&gt;Save the package to your local drive. &lt;/li&gt;    &lt;li&gt;Next browse to where you saved the file and rename it from &lt;strong&gt;.fwp&lt;/strong&gt; to &lt;strong&gt;.cab&lt;/strong&gt;. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Extract manifest.xml to your local drive&lt;/strong&gt;. &lt;/li&gt;    &lt;li&gt;Load the file up in your favourite XML viewer (might take a second or two it can be a large file). &lt;/li&gt;    &lt;li&gt;Navigate to the UserLists/Field node (Solution/UserLists/Fields). &lt;/li&gt;    &lt;li&gt;within this node look for your field, you will be able to see the CAML that describes your field. &lt;/li&gt; &lt;/ul&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9424457" width="1" height="1"&gt;</content><author><name>NicolD</name><uri>http://blogs.msdn.com/members/NicolD.aspx</uri></author><category term="NicolTIP" scheme="http://blogs.msdn.com/nicold/archive/tags/NicolTIP/default.aspx" /><category term="Content Type" scheme="http://blogs.msdn.com/nicold/archive/tags/Content+Type/default.aspx" /><category term="manifest.xml" scheme="http://blogs.msdn.com/nicold/archive/tags/manifest.xml/default.aspx" /><category term="MOSS" scheme="http://blogs.msdn.com/nicold/archive/tags/MOSS/default.aspx" /><category term="Sharepoint Designer" scheme="http://blogs.msdn.com/nicold/archive/tags/Sharepoint+Designer/default.aspx" /></entry><entry><title>NicolTIP#001: edit easily your machine's HOST file</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nicold/archive/2009/02/11/nicoltip-001-edit-easily-your-machine-s-host-file.aspx" /><id>http://blogs.msdn.com/nicold/archive/2009/02/11/nicoltip-001-edit-easily-your-machine-s-host-file.aspx</id><published>2009-02-11T19:57:38Z</published><updated>2009-02-11T19:57:38Z</updated><content type="html">&lt;p&gt;Edit the HOST file in Vista is difficult than ever, thanks to UAC. If you’re a geek that changes HOST file daily this can be a bit frustrating. I circumnavigated the difficulty with a shortcut.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Right click on the folder you want to place the hyperlink (i.e. desktop) and select “new-&amp;gt;Shortcut” &lt;/li&gt;    &lt;li&gt;As location of the item type: &lt;strong&gt;notepad.exe C:\Windows\System32\drivers\etc\hosts&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;As Shortcut name type “Edit HOST file (as administrator)” &lt;/li&gt;    &lt;li&gt;right click on the new shortcut just created and select “properties” &lt;/li&gt;    &lt;li&gt;Select “Advanced” &lt;/li&gt;    &lt;li&gt;Select “Run as Administrator” &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Now, if you need to edit the HOST file (and folder where you put the shortcut is indexed by vista search) just click on start button and type “edit host”&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/NicolTIP001editeasilymachineHOSTfile_D8A2/nicoldtip01_2.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Edit Machine HOST file" border="0" alt="Edit Machine HOST file" src="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/NicolTIP001editeasilymachineHOSTfile_D8A2/nicoldtip01_thumb.png" width="454" height="789" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9412999" width="1" height="1"&gt;</content><author><name>NicolD</name><uri>http://blogs.msdn.com/members/NicolD.aspx</uri></author><category term="Vista" scheme="http://blogs.msdn.com/nicold/archive/tags/Vista/default.aspx" /><category term="Host file" scheme="http://blogs.msdn.com/nicold/archive/tags/Host+file/default.aspx" /><category term="NicolTIP" scheme="http://blogs.msdn.com/nicold/archive/tags/NicolTIP/default.aspx" /><category term="UAC" scheme="http://blogs.msdn.com/nicold/archive/tags/UAC/default.aspx" /></entry><entry><title>Chrome OS?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nicold/archive/2008/09/25/chrome-os.aspx" /><id>http://blogs.msdn.com/nicold/archive/2008/09/25/chrome-os.aspx</id><published>2008-09-25T10:27:51Z</published><updated>2008-09-25T10:27:51Z</updated><content type="html">&lt;p&gt;Yesterday evening I had the opportunity to read in detail the &lt;a href="http://www.google.com/googlebooks/chrome/" target="_blank"&gt;document that describe Google Chrome features&lt;/a&gt;. Interesting is that if I read &amp;quot;O.S.&amp;quot; each time in the document appairs the word &amp;quot;browser&amp;quot; all the document continues to have sense. Very, very interesting:-)&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8964697" width="1" height="1"&gt;</content><author><name>NicolD</name><uri>http://blogs.msdn.com/members/NicolD.aspx</uri></author><category term="chrome" scheme="http://blogs.msdn.com/nicold/archive/tags/chrome/default.aspx" /></entry><entry><title>Polipo Matico</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nicold/archive/2008/08/27/polipo-matico.aspx" /><id>http://blogs.msdn.com/nicold/archive/2008/08/27/polipo-matico.aspx</id><published>2008-08-27T19:17:02Z</published><updated>2008-08-27T19:17:02Z</updated><content type="html">&lt;p&gt;PolipoMatico is a Windows Vista sidebar gadget that allows to retrieve and show italia traffic infos from octotelematics web site (&lt;a href="http://www.octotelematics.it"&gt;www.octotelematics.it&lt;/a&gt;)     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/PolipoMatico_100A0/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="133" alt="image" src="http://blogs.msdn.com/blogfiles/nicold/WindowsLiveWriter/PolipoMatico_100A0/image_thumb.png" width="141" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Why&lt;/b&gt;     &lt;br /&gt;Because traffic in Italy is a serious topic, and because we like to be at home, at the end of the day, with less stress as possible:-)     &lt;br /&gt;&lt;/p&gt; &lt;b&gt;&lt;/b&gt;  &lt;p&gt;&lt;b&gt;Usage&lt;/b&gt;     &lt;br /&gt;Just install the gadget, and add it to the sidebar. Main commands:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;Mouse wheel&lt;/b&gt;: zoom in and out &lt;/li&gt;    &lt;li&gt;Use the &lt;b&gt;orange icon&lt;/b&gt; to select &amp;quot;rotate&amp;quot; or &amp;quot;drag&amp;quot; mode &lt;/li&gt;    &lt;li&gt;to rotate or drag, just click and drag the image &lt;/li&gt;    &lt;li&gt;&lt;b&gt;double click&lt;/b&gt;: reset image position &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;   &lt;br /&gt;&lt;b&gt;Supported Areas&lt;/b&gt;     &lt;br /&gt;Roma - GRA (Grande Raccordo Anulare)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Download it from CodePlex: &lt;a href="http://www.codeplex.com/PolipoMatico" target="_blank"&gt;Polipo Matico&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8900600" width="1" height="1"&gt;</content><author><name>NicolD</name><uri>http://blogs.msdn.com/members/NicolD.aspx</uri></author><category term="Vista" scheme="http://blogs.msdn.com/nicold/archive/tags/Vista/default.aspx" /><category term="gadget" scheme="http://blogs.msdn.com/nicold/archive/tags/gadget/default.aspx" /><category term="sidebar" scheme="http://blogs.msdn.com/nicold/archive/tags/sidebar/default.aspx" /><category term="PolipoMatico" scheme="http://blogs.msdn.com/nicold/archive/tags/PolipoMatico/default.aspx" /><category term="Polipo Matico" scheme="http://blogs.msdn.com/nicold/archive/tags/Polipo+Matico/default.aspx" /></entry><entry><title>What a fantastic 'for dummies' tutorial on AJAX</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nicold/archive/2008/06/24/what-a-fantastic-for-dummies-tutorial-on-ajax.aspx" /><id>http://blogs.msdn.com/nicold/archive/2008/06/24/what-a-fantastic-for-dummies-tutorial-on-ajax.aspx</id><published>2008-06-24T15:52:35Z</published><updated>2008-06-24T15:52:35Z</updated><content type="html">&lt;p&gt;Check it out.&lt;/p&gt;  &lt;p&gt;&lt;a title="http://javascript.about.com/od/learnajax/Learn_AJAX.htm" href="http://javascript.about.com/od/learnajax/Learn_AJAX.htm"&gt;http://javascript.about.com/od/learnajax/Learn_AJAX.htm&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8647136" width="1" height="1"&gt;</content><author><name>NicolD</name><uri>http://blogs.msdn.com/members/NicolD.aspx</uri></author><category term="AJAX" scheme="http://blogs.msdn.com/nicold/archive/tags/AJAX/default.aspx" /><category term="JScript" scheme="http://blogs.msdn.com/nicold/archive/tags/JScript/default.aspx" /></entry><entry><title>How to provide a context sentitive help to your WPF application</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nicold/archive/2008/06/10/how-to-provide-a-context-sentitive-help-to-your-wpf-application.aspx" /><id>http://blogs.msdn.com/nicold/archive/2008/06/10/how-to-provide-a-context-sentitive-help-to-your-wpf-application.aspx</id><published>2008-06-10T15:16:55Z</published><updated>2008-06-10T15:16:55Z</updated><content type="html">&lt;p&gt;I found the following (and very) interesting post where is well described how to provide your windows presentation fundation client application with a context sensitive help. Chek it out!&lt;/p&gt;  &lt;p&gt;&lt;a title="http://blogs.msdn.com/mikehillberg/archive/2007/07/26/a-context-sensitive-help-provider-in-wpf.aspx" href="http://blogs.msdn.com/mikehillberg/archive/2007/07/26/a-context-sensitive-help-provider-in-wpf.aspx"&gt;http://blogs.msdn.com/mikehillberg/archive/2007/07/26/a-context-sensitive-help-provider-in-wpf.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8589817" width="1" height="1"&gt;</content><author><name>NicolD</name><uri>http://blogs.msdn.com/members/NicolD.aspx</uri></author><category term="WPF" scheme="http://blogs.msdn.com/nicold/archive/tags/WPF/default.aspx" /><category term=".NET" scheme="http://blogs.msdn.com/nicold/archive/tags/.NET/default.aspx" /><category term="context sensitive help" scheme="http://blogs.msdn.com/nicold/archive/tags/context+sensitive+help/default.aspx" /></entry><entry><title>Win32 Application contextmenu piloting (UI Automation)</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nicold/archive/2008/06/06/win32-application-contextmenu-piloting-ui-automation.aspx" /><id>http://blogs.msdn.com/nicold/archive/2008/06/06/win32-application-contextmenu-piloting-ui-automation.aspx</id><published>2008-06-06T01:35:15Z</published><updated>2008-06-06T01:35:15Z</updated><content type="html">&lt;p&gt;I just developed a PoC where I demonstrated to my customer how is feasible to integrate and manipulate a Win32 application (&lt;a href="http://en.wikipedia.org/wiki/AR_System_User" target="_blank"&gt;Remedy Client&lt;/a&gt; in my case) into a CCF (Customer Care Framework) client application.&lt;/p&gt;  &lt;p&gt;In this context I had some problem in piloting context menu. the couple of link below give much information.&lt;/p&gt;  &lt;p&gt;My main takeways:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;standard context menu class name is &amp;quot;#32768&amp;quot; &lt;/li&gt;    &lt;li&gt;usually context menu send a WM_COMMAND message to the application window with an ID that trigger the operation &lt;/li&gt;    &lt;li&gt;when you successfully selected the context menu window (you have the HWND):      &lt;ul&gt;       &lt;li&gt;you can choose the menu item via WM_KEYDOWN/VK_DOWN messages &lt;/li&gt;        &lt;li&gt;you can activate the menu item via a WM_KEYDOWN/VK_ENTER message &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Links that saved my day:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://forums.devx.com/archive/index.php/t-42885.html"&gt;http://forums.devx.com/archive/index.php/t-42885.html&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.autoitscript.com/forum/index.php?showtopic=33677&amp;amp;st=15"&gt;http://www.autoitscript.com/forum/index.php?showtopic=33677&amp;amp;st=15&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8576420" width="1" height="1"&gt;</content><author><name>NicolD</name><uri>http://blogs.msdn.com/members/NicolD.aspx</uri></author><category term="Win32" scheme="http://blogs.msdn.com/nicold/archive/tags/Win32/default.aspx" /><category term="UIAutomation" scheme="http://blogs.msdn.com/nicold/archive/tags/UIAutomation/default.aspx" /><category term="Context Menu" scheme="http://blogs.msdn.com/nicold/archive/tags/Context+Menu/default.aspx" /></entry><entry><title>WPF: How to embed an Icon in an Assembly</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nicold/archive/2008/06/05/wpf-how-to-embed-an-icon-in-an-assembly.aspx" /><id>http://blogs.msdn.com/nicold/archive/2008/06/05/wpf-how-to-embed-an-icon-in-an-assembly.aspx</id><published>2008-06-05T17:51:29Z</published><updated>2008-06-05T17:51:29Z</updated><content type="html">&lt;p&gt;You can easily integrate resources in your Windows Presentation Foundation application by using the WPF designer for Visual Studio and &amp;quot;pack:&amp;quot; URI scheme provided by XAML to reference resources in your application's XAML.&lt;/p&gt;  &lt;p&gt;for more information have a look to &lt;a href="http://msdn.microsoft.con/en-us/library/bb514517.aspx" target="_blank"&gt;MSDN article&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8575404" width="1" height="1"&gt;</content><author><name>NicolD</name><uri>http://blogs.msdn.com/members/NicolD.aspx</uri></author><category term="WPF" scheme="http://blogs.msdn.com/nicold/archive/tags/WPF/default.aspx" /></entry><entry><title>How to access Hyper-V (RC0) machine (workgroup) from Vista SP1 joined to a domain</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/nicold/archive/2008/04/16/how-to-access-hyper-v-rc0-machine-workgroup-from-vista-sp1-joined-to-a-domain.aspx" /><id>http://blogs.msdn.com/nicold/archive/2008/04/16/how-to-access-hyper-v-rc0-machine-workgroup-from-vista-sp1-joined-to-a-domain.aspx</id><published>2008-04-16T12:11:47Z</published><updated>2008-04-16T12:11:47Z</updated><content type="html">&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;: Install &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=BC3D09CC-3752-4934-B84C-905E78BE50A1&amp;amp;displaylang=en" target="_blank"&gt;this update&lt;/a&gt; to enable remote management of a Windows Server 2008 computer running the Hyper-V RC0 role&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;: If the server is either a member of WORKGROUP or is in a different domain that is untrusted by the client, then the connection from the server to the client used to return asynchronous results is created as an Anonymous connection. An anonymous connection fails with either the 0x80070005 error or the 0x8007000e error unless Anonymous connections are given the DCOM Remote Access permission on the client. The following steps grant DCOM remote access permissions from the server to the client in this scenario.&lt;/p&gt;  &lt;ol&gt;   &lt;ol&gt;     &lt;li&gt;Click &lt;b&gt;Start&lt;/b&gt;, click &lt;b&gt;Run&lt;/b&gt;, type &lt;b&gt;DCOMCNFG&lt;/b&gt;, and then click &lt;b&gt;OK&lt;/b&gt;. &lt;/li&gt;      &lt;li&gt;In the &lt;b&gt;Component Services&lt;/b&gt; dialog box, expand &lt;b&gt;Component Services&lt;/b&gt;, expand &lt;b&gt;Computers&lt;/b&gt;, and then right-click &lt;b&gt;My Computer&lt;/b&gt; and click &lt;b&gt;Properties&lt;/b&gt;. &lt;/li&gt;      &lt;li&gt;In the &lt;b&gt;My Computer Properties&lt;/b&gt; dialog box, click the &lt;b&gt;COM Security&lt;/b&gt; tab. &lt;/li&gt;      &lt;li&gt;Under &lt;b&gt;Access Permissions&lt;/b&gt;, click &lt;b&gt;Edit Limits&lt;/b&gt;. &lt;/li&gt;      &lt;li&gt;In the &lt;b&gt;Access Permission&lt;/b&gt; dialog box, select &lt;b&gt;ANONYMOUS LOGON&lt;/b&gt; name in the &lt;b&gt;Group or user names&lt;/b&gt; box. In the &lt;b&gt;Allow&lt;/b&gt; column under &lt;b&gt;Permissions for User&lt;/b&gt;, select &lt;b&gt;Remote Access&lt;/b&gt;, and then click &lt;b&gt;OK&lt;/b&gt;. &lt;/li&gt;   &lt;/ol&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt;: from command prompt execute the following command:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;cmdkey /add:&lt;strong&gt;yourhyper-vmachine&lt;/strong&gt; /user:&lt;strong&gt;hyper-vdomani&lt;/strong&gt;\&lt;strong&gt;administrator&lt;/strong&gt; /pass:&lt;strong&gt;hyper-vadministratorpassword&lt;/strong&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;in example:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;cmdkey /add:srv04 /user:srv04\administrator /pass:123.password.123&lt;/li&gt; &lt;/ul&gt; NOTE: &lt;strong&gt;&lt;font color="#ff0000"&gt;use netbios name (i.e. SRV04) and not FQDN name (i.e. SRV04.myintranet.local)&lt;/font&gt;&lt;/strong&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8398813" width="1" height="1"&gt;</content><author><name>NicolD</name><uri>http://blogs.msdn.com/members/NicolD.aspx</uri></author><category term="Vista" scheme="http://blogs.msdn.com/nicold/archive/tags/Vista/default.aspx" /><category term="Hyper-V" scheme="http://blogs.msdn.com/nicold/archive/tags/Hyper-V/default.aspx" /></entry></feed>