<?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>Wiz/dumb : Outlook 2007</title><link>http://blogs.msdn.com/pcreehan/archive/tags/Outlook+2007/default.aspx</link><description>Tags: Outlook 2007</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Line Breaks in Managed Web Service Proxy Classes</title><link>http://blogs.msdn.com/pcreehan/archive/2009/07/22/line-breaks-in-managed-web-service-proxy-classes.aspx</link><pubDate>Wed, 22 Jul 2009 16:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9844004</guid><dc:creator>Patrick Creehan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/pcreehan/comments/9844004.aspx</comments><wfw:commentRss>http://blogs.msdn.com/pcreehan/commentrss.aspx?PostID=9844004</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://blogs.msdn.com/mstehle" target="_blank"&gt;Matt&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/rickhall/" target="_blank"&gt;Rick&lt;/a&gt;, and I were working on an issue recently where when an application using EWS would set a contact’s Street address to a value containing a carriage return and line feed, like this:&lt;/p&gt;  &lt;div style="padding-bottom: 5px; padding-left: 5px; width: 519px; padding-right: 5px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 5px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e582ef6a-2f57-44bf-9a0d-0a69c46a7e60" class="wlWriterEditableSmartContent"&gt;
&lt;div style="border: #000080 1px solid; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"&gt;
&lt;div style="background-color: #ffffff; max-height: auto; overflow: scroll; padding: 2px 5px; white-space: nowrap"&gt;
&lt;p&gt;  physicalAddress.Street = &lt;span style="color:#a31515"&gt;"1234 56 Ave NE&amp;#92;r&amp;#92;nc/oPatrick Creehan"&lt;/span&gt;;
&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;  &lt;p&gt;the address card control in Outlook would render it like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/pcreehan/WindowsLiveWriter/LineBreaksinManagedWebServiceProxyClasse_FFB2/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/pcreehan/WindowsLiveWriter/LineBreaksinManagedWebServiceProxyClasse_FFB2/image_thumb.png" width="244" height="168" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Ugly, right? The problem was that the XMLSerializer would strip out the line feed and leave the carriage return, which the address card didn’t like.&lt;/p&gt;  &lt;p&gt;We could prove by sending raw XML requests in a separate application that sending &amp;amp;#x0d;&amp;amp;#x0a; for the carriage return line feed would make everything right, however, if we set the street address like this:&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div style="padding-bottom: 5px; padding-left: 5px; width: 519px; padding-right: 5px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 5px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:1fc5c445-38f8-4f60-b627-4423e203f45f" class="wlWriterEditableSmartContent"&gt;
&lt;div style="border: #000080 1px solid; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"&gt;
&lt;div style="background-color: #ffffff; max-height: auto; overflow: scroll; padding: 2px 5px; white-space: nowrap"&gt;
&lt;p&gt;  physicalAddress.Street = &lt;span style="color:#a31515"&gt;"1234 56 Ave NE&amp;amp;#x0d;&amp;amp;#x0a;c/oPatrick Creehan"&lt;/span&gt;;
&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;  &lt;p&gt;then the contact’s address card would look like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/pcreehan/WindowsLiveWriter/LineBreaksinManagedWebServiceProxyClasse_FFB2/image_4.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/pcreehan/WindowsLiveWriter/LineBreaksinManagedWebServiceProxyClasse_FFB2/image_thumb_1.png" width="244" height="170" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Even uglier! It seems that the .net framework, in an attempt to help us out is encoding our string for XML but it wasn’t letting us specify the value we knew was right.&lt;/p&gt;  &lt;p&gt;So – the solution is to implement your own class which can handle the XmlSerialization yourself, and replace the auto-generated proxy class’s decision for the type to yours.&lt;/p&gt;  &lt;p&gt;Here’s my simple class:&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div style="padding-bottom: 5px; padding-left: 5px; width: 519px; padding-right: 5px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 5px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:627acf82-aa7a-47c3-958e-2293295323ee" class="wlWriterEditableSmartContent"&gt;
&lt;div style="border: #000080 1px solid; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"&gt;
&lt;div style="background: #ddd; max-height: 300px; overflow: scroll; padding: 0"&gt;
&lt;ol style="background: #ffffff; margin: 0 0 0 35px; white-space: nowrap"&gt;
&lt;li&gt;     [&lt;span style="color:#2b91af"&gt;SoapTypeAttribute&lt;/span&gt;(Namespace = &lt;span style="color:#a31515"&gt;"http://schemas.microsoft.com/exchange/services/2006/types"&lt;/span&gt;,TypeName=&lt;span style="color:#a31515"&gt;"text"&lt;/span&gt;)]&lt;/li&gt;&lt;li&gt;     &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af"&gt;mstring&lt;/span&gt;:&lt;span style="color:#2b91af"&gt;IXmlSerializable&lt;/span&gt;   &lt;/li&gt;&lt;li&gt;     {&lt;/li&gt;&lt;li&gt;         &lt;span style="color:#0000ff"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; m_string = &lt;span style="color:#0000ff"&gt;string&lt;/span&gt;.Empty;&lt;/li&gt;&lt;li&gt; &lt;/li&gt;&lt;li&gt;         &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; ToString()&lt;/li&gt;&lt;li&gt;         {&lt;/li&gt;&lt;li&gt;             &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; m_string;&lt;/li&gt;&lt;li&gt;         }&lt;/li&gt;&lt;li&gt;         &lt;/li&gt;&lt;li&gt;  &lt;/li&gt;&lt;li&gt;         &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#2b91af"&gt;mstring&lt;/span&gt; CreateMString(&lt;span style="color:#0000ff"&gt;string&lt;/span&gt; str){&lt;/li&gt;&lt;li&gt;             &lt;span style="color:#2b91af"&gt;mstring&lt;/span&gt; newmstring = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af"&gt;mstring&lt;/span&gt;();&lt;/li&gt;&lt;li&gt;             newmstring.m_string = str;&lt;/li&gt;&lt;li&gt;             &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; newmstring;&lt;/li&gt;&lt;li&gt;         }&lt;/li&gt;&lt;li&gt; &lt;/li&gt;&lt;li&gt;         &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;implicit&lt;/span&gt; &lt;span style="color:#0000ff"&gt;operator&lt;/span&gt; &lt;span style="color:#2b91af"&gt;mstring&lt;/span&gt;(&lt;span style="color:#0000ff"&gt;string&lt;/span&gt; str)&lt;/li&gt;&lt;li&gt;         {&lt;/li&gt;&lt;li&gt;             &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; CreateMString(str);&lt;/li&gt;&lt;li&gt;         }&lt;/li&gt;&lt;li&gt; &lt;/li&gt;&lt;li&gt; &lt;/li&gt;&lt;li&gt; &lt;span style="color:#0000ff"&gt;        #region&lt;/span&gt; IXmlSerializable Members&lt;/li&gt;&lt;li&gt; &lt;/li&gt;&lt;li&gt;         &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; System.Xml.Schema.&lt;span style="color:#2b91af"&gt;XmlSchema&lt;/span&gt; GetSchema()&lt;/li&gt;&lt;li&gt;         {&lt;/li&gt;&lt;li&gt;             &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; System.Xml.Schema.&lt;span style="color:#2b91af"&gt;XmlSchema&lt;/span&gt;();&lt;/li&gt;&lt;li&gt;         }&lt;/li&gt;&lt;li&gt; &lt;/li&gt;&lt;li&gt;         &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; ReadXml(&lt;span style="color:#2b91af"&gt;XmlReader&lt;/span&gt; reader)&lt;/li&gt;&lt;li&gt;         {&lt;/li&gt;&lt;li&gt;             m_string = reader.ReadContentAsString();&lt;/li&gt;&lt;li&gt;         }&lt;/li&gt;&lt;li&gt; &lt;/li&gt;&lt;li&gt;         &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; WriteXml(&lt;span style="color:#2b91af"&gt;XmlWriter&lt;/span&gt; writer)&lt;/li&gt;&lt;li&gt;         {&lt;/li&gt;&lt;li&gt;             &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; outString = m_string;&lt;/li&gt;&lt;li&gt;             outString = &lt;span style="color:#2b91af"&gt;HttpUtility&lt;/span&gt;.HtmlEncode(outString);&lt;/li&gt;&lt;li&gt; &lt;/li&gt;&lt;li&gt;             outString = outString.Replace(&lt;span style="color:#a31515"&gt;"&amp;#92;r"&lt;/span&gt;, &lt;span style="color:#a31515"&gt;"&amp;amp;#x0d;"&lt;/span&gt;);&lt;/li&gt;&lt;li&gt;             outString = outString.Replace(&lt;span style="color:#a31515"&gt;"&amp;#92;n"&lt;/span&gt;, &lt;span style="color:#a31515"&gt;"&amp;amp;#x0a;"&lt;/span&gt;);&lt;/li&gt;&lt;li&gt; &lt;/li&gt;&lt;li&gt;             writer.WriteRaw(outString.ToString());&lt;/li&gt;&lt;li&gt;         \&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;A few things to point out is that I decorated this class with the XML namespace for the Exchange Web Services so that it doesn’t fail schema validation. Also, I didn’t really test whether this works when binding to an existing contact – there may be more work needed in the ReadXML section. In order to support still setting the Street property to a string, I had to override the implicit operator. That allows me to set Street to a string even though technically, now Street is an “mstring.” You’ll notice that the work of actually writing the correct value occurs in WriteXml which we got by implementing IXmlSerializable. Now when the SOAP infrastructure goes to build the request, it will call into our interface to serialize this class.&lt;/p&gt;  &lt;p&gt;That reminds me, the last thing you need to do to hook all this up is to go into the web service proxy class Reference.cs and modify the PhysicalAddressDictionaryEntryType so the street properties use your new mstring class instead of string:&lt;/p&gt;  &lt;div style="padding-bottom: 5px; padding-left: 5px; width: 519px; padding-right: 5px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 5px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:c8541ccf-1be2-4f5d-a2d5-246bbfb5f0cc" class="wlWriterEditableSmartContent"&gt;
&lt;div style="border: #000080 1px solid; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"&gt;
&lt;div style="background: #ddd; max-height: 300px; overflow: scroll; padding: 0"&gt;
&lt;ol style="background: #ffffff; margin: 0 0 0 35px; white-space: nowrap"&gt;
&lt;li&gt;     &lt;span style="color:#808080"&gt;///&lt;/span&gt;&lt;span style="color:#008000"&gt; &lt;/span&gt;&lt;span style="color:#808080"&gt;&amp;lt;remarks/&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;     [System.CodeDom.Compiler.&lt;span style="color:#2b91af"&gt;GeneratedCodeAttribute&lt;/span&gt;(&lt;span style="color:#a31515"&gt;"System.Xml"&lt;/span&gt;, &lt;span style="color:#a31515"&gt;"2.0.50727.4918"&lt;/span&gt;)]&lt;/li&gt;&lt;li&gt;     [System.&lt;span style="color:#2b91af"&gt;SerializableAttribute&lt;/span&gt;()]&lt;/li&gt;&lt;li&gt;     [System.Diagnostics.&lt;span style="color:#2b91af"&gt;DebuggerStepThroughAttribute&lt;/span&gt;()]&lt;/li&gt;&lt;li&gt;     [System.ComponentModel.&lt;span style="color:#2b91af"&gt;DesignerCategoryAttribute&lt;/span&gt;(&lt;span style="color:#a31515"&gt;"code"&lt;/span&gt;)]&lt;/li&gt;&lt;li&gt;     [System.Xml.Serialization.&lt;span style="color:#2b91af"&gt;XmlTypeAttribute&lt;/span&gt;(Namespace=&lt;span style="color:#a31515"&gt;"http://schemas.microsoft.com/exchange/services/2006/types"&lt;/span&gt;)]&lt;/li&gt;&lt;li&gt;     &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;partial&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af"&gt;PhysicalAddressDictionaryEntryType&lt;/span&gt; {&lt;/li&gt;&lt;li&gt;         &lt;/li&gt;&lt;li&gt;         &lt;span style="color:#0000ff"&gt;private&lt;/span&gt; &lt;span style="color:#2b91af"&gt;mstring&lt;/span&gt; streetField;&lt;/li&gt;&lt;li&gt;         &lt;/li&gt;&lt;li&gt;         &lt;span style="color:#0000ff"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; cityField;&lt;/li&gt;&lt;li&gt;         &lt;/li&gt;&lt;li&gt;         &lt;span style="color:#0000ff"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; stateField;&lt;/li&gt;&lt;li&gt;         &lt;/li&gt;&lt;li&gt;         &lt;span style="color:#0000ff"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; countryOrRegionField;&lt;/li&gt;&lt;li&gt;         &lt;/li&gt;&lt;li&gt;         &lt;span style="color:#0000ff"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; postalCodeField;&lt;/li&gt;&lt;li&gt;         &lt;/li&gt;&lt;li&gt;         &lt;span style="color:#0000ff"&gt;private&lt;/span&gt; &lt;span style="color:#2b91af"&gt;PhysicalAddressKeyType&lt;/span&gt; keyField;&lt;/li&gt;&lt;li&gt;         &lt;/li&gt;&lt;li&gt;         &lt;span style="color:#808080"&gt;///&lt;/span&gt;&lt;span style="color:#008000"&gt; &lt;/span&gt;&lt;span style="color:#808080"&gt;&amp;lt;remarks/&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;         &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#2b91af"&gt;mstring&lt;/span&gt; Street {&lt;/li&gt;&lt;li&gt;             &lt;span style="color:#0000ff"&gt;get&lt;/span&gt; {&lt;/li&gt;&lt;li&gt;                 &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.streetField;&lt;/li&gt;&lt;li&gt;             }&lt;/li&gt;&lt;li&gt;             &lt;span style="color:#0000ff"&gt;set&lt;/span&gt; {&lt;/li&gt;&lt;li&gt;                 &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.streetField = &lt;span style="color:#0000ff"&gt;value&lt;/span&gt;;&lt;/li&gt;&lt;li&gt;             }&lt;/li&gt;&lt;li&gt;         }&lt;/li&gt;&lt;li&gt; &lt;/li&gt;&lt;li&gt;         &lt;span style="color:#808080"&gt;///&lt;/span&gt;&lt;span style="color:#008000"&gt; &lt;/span&gt;&lt;span style="color:#808080"&gt;&amp;lt;remarks/&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;         &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; City {&lt;/li&gt;&lt;li&gt;             &lt;span style="color:#0000ff"&gt;get&lt;/span&gt; {&lt;/li&gt;&lt;li&gt;                 &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.cityField;&lt;/li&gt;&lt;li&gt;             }&lt;/li&gt;&lt;li&gt;             &lt;span style="color:#0000ff"&gt;set&lt;/span&gt; {&lt;/li&gt;&lt;li&gt;                 &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.cityField = &lt;span style="color:#0000ff"&gt;value&lt;/span&gt;;&lt;/li&gt;&lt;li&gt;             }&lt;/li&gt;&lt;li&gt;         }&lt;/li&gt;&lt;li&gt;         &lt;/li&gt;&lt;li&gt;         &lt;span style="color:#808080"&gt;///&lt;/span&gt;&lt;span style="color:#008000"&gt; &lt;/span&gt;&lt;span style="color:#808080"&gt;&amp;lt;remarks/&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;         &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; State {&lt;/li&gt;&lt;li&gt;             &lt;span style="color:#0000ff"&gt;get&lt;/span&gt; {&lt;/li&gt;&lt;li&gt;                 &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.stateField;&lt;/li&gt;&lt;li&gt;             }&lt;/li&gt;&lt;li&gt;             &lt;span style="color:#0000ff"&gt;set&lt;/span&gt; {&lt;/li&gt;&lt;li&gt;                 &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.stateField = &lt;span style="color:#0000ff"&gt;value&lt;/span&gt;;&lt;/li&gt;&lt;li&gt;             }&lt;/li&gt;&lt;li&gt;         }&lt;/li&gt;&lt;li&gt;         &lt;/li&gt;&lt;li&gt;         &lt;span style="color:#808080"&gt;///&lt;/span&gt;&lt;span style="color:#008000"&gt; &lt;/span&gt;&lt;span style="color:#808080"&gt;&amp;lt;remarks/&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;         &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; CountryOrRegion {&lt;/li&gt;&lt;li&gt;             &lt;span style="color:#0000ff"&gt;get&lt;/span&gt; {&lt;/li&gt;&lt;li&gt;                 &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.countryOrRegionField;&lt;/li&gt;&lt;li&gt;             }&lt;/li&gt;&lt;li&gt;             &lt;span style="color:#0000ff"&gt;set&lt;/span&gt; {&lt;/li&gt;&lt;li&gt;                 &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.countryOrRegionField = &lt;span style="color:#0000ff"&gt;value&lt;/span&gt;;&lt;/li&gt;&lt;li&gt;             }&lt;/li&gt;&lt;li&gt;         }&lt;/li&gt;&lt;li&gt;         &lt;/li&gt;&lt;li&gt;         &lt;span style="color:#808080"&gt;///&lt;/span&gt;&lt;span style="color:#008000"&gt; &lt;/span&gt;&lt;span style="color:#808080"&gt;&amp;lt;remarks/&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;         &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; PostalCode {&lt;/li&gt;&lt;li&gt;             &lt;span style="color:#0000ff"&gt;get&lt;/span&gt; {&lt;/li&gt;&lt;li&gt;                 &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.postalCodeField;&lt;/li&gt;&lt;li&gt;             }&lt;/li&gt;&lt;li&gt;             &lt;span style="color:#0000ff"&gt;set&lt;/span&gt; {&lt;/li&gt;&lt;li&gt;                 &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.postalCodeField = &lt;span style="color:#0000ff"&gt;value&lt;/span&gt;;&lt;/li&gt;&lt;li&gt;             }&lt;/li&gt;&lt;li&gt;         }&lt;/li&gt;&lt;li&gt;         &lt;/li&gt;&lt;li&gt;         &lt;span style="color:#808080"&gt;///&lt;/span&gt;&lt;span style="color:#008000"&gt; &lt;/span&gt;&lt;span style="color:#808080"&gt;&amp;lt;remarks/&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;         [System.Xml.Serialization.&lt;span style="color:#2b91af"&gt;XmlAttributeAttribute&lt;/span&gt;()]&lt;/li&gt;&lt;li&gt;         &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#2b91af"&gt;PhysicalAddressKeyType&lt;/span&gt; Key {&lt;/li&gt;&lt;li&gt;             &lt;span style="color:#0000ff"&gt;get&lt;/span&gt; {&lt;/li&gt;&lt;li&gt;                 &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.keyField;&lt;/li&gt;&lt;li&gt;             }&lt;/li&gt;&lt;li&gt;             &lt;span style="color:#0000ff"&gt;set&lt;/span&gt; {&lt;/li&gt;&lt;li&gt;                 &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.keyField = &lt;span style="color:#0000ff"&gt;value&lt;/span&gt;;&lt;/li&gt;&lt;li&gt;             }&lt;/li&gt;&lt;li&gt;         }&lt;/li&gt;&lt;li&gt;     \&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;  &lt;p&gt;and (after removing the email address so the address will fit on the card) it looks like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/pcreehan/WindowsLiveWriter/LineBreaksinManagedWebServiceProxyClasse_FFB2/image_6.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/pcreehan/WindowsLiveWriter/LineBreaksinManagedWebServiceProxyClasse_FFB2/image_thumb_2.png" width="244" height="144" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Cake.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9844004" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Exchange/default.aspx">Exchange</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Exchange+2007/default.aspx">Exchange 2007</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Exchange+Web+Services+_2800_EWS_2900_/default.aspx">Exchange Web Services (EWS)</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>ConfigureMsgService fails with MAPI_E_INVALID_PARAMETER (0x80070057)</title><link>http://blogs.msdn.com/pcreehan/archive/2009/07/10/configuremsgservice-fails-with-mapi-e-invalid-parameter-0x80070057.aspx</link><pubDate>Fri, 10 Jul 2009 16:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9824944</guid><dc:creator>Patrick Creehan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/pcreehan/comments/9824944.aspx</comments><wfw:commentRss>http://blogs.msdn.com/pcreehan/commentrss.aspx?PostID=9824944</wfw:commentRss><description>&lt;p&gt;I recently helped a customer with an issue where they were calling &lt;a href="http://msdn.microsoft.com/en-us/library/cc815632.aspx" target="_blank"&gt;ConfigureMsgService&lt;/a&gt; and that call was failing, returning an HRESULT of MAPI_E_INVALID_PARAMETER (0x80070057). After debugging it, we established that the reason that ConfigureMsgService was failing was that the PR_PROFILE_HOME_SERVER_ADDRS property was missing from the profile. Outlook seemed to work fine, logons worked, sending mail worked; it was just that ConfigureMsgService would fail. We tried recreating the profile, but still the property wasn’t being set on the profile.&lt;/p&gt;  &lt;p&gt;It turns out that PR_PROFILE_HOME_SERVER_ADDRS gets its value from PR_EMS_AB_NETWORK_ADDRESS, which in turn, gets its value from the networkAddress attribute on the server object in Active Directory. That value was set correctly, but permissions to that object were not. After following the requirements laid out on &lt;a href="http://technet.microsoft.com/en-us/library/bb123738(EXCHG.65).aspx" target="_blank"&gt;technet&lt;/a&gt; for permissions to AD objects, we determined that the Authenticated Users group was missing the ACL for Read All Properties on the server object. Once we set that permission and recreated the profile, the property was set correctly on the profile and ConfigureMsgService started succeeding.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9824944" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Exchange/default.aspx">Exchange</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/MAPI/default.aspx">MAPI</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Exchange+2007/default.aspx">Exchange 2007</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>MAPI Docs Moved</title><link>http://blogs.msdn.com/pcreehan/archive/2008/12/04/mapi-docs-moved.aspx</link><pubDate>Thu, 04 Dec 2008 18:34:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9175526</guid><dc:creator>Patrick Creehan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/pcreehan/comments/9175526.aspx</comments><wfw:commentRss>http://blogs.msdn.com/pcreehan/commentrss.aspx?PostID=9175526</wfw:commentRss><description>&lt;P&gt;So, the Exchange team decided they didn't want to maintain the MAPI documentation anymore since they don't ship MAPI anymore. So the Outlook team stepped up and took over the docs. As such, you can now find them under the Outlook branch in the MSDN left-nav.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/cc765775.aspx"&gt;http://msdn.microsoft.com/en-us/library/cc765775.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A target=_blank href="http://blogs.msdn.com/stephen_griffin" mce_href="http://blogs.msdn.com/stephen_griffin"&gt;Steve Griffin&lt;/A&gt; has been working with the Outlook team&amp;nbsp;on prettying them up and updating them for a few months,&amp;nbsp;and they're now&amp;nbsp;better than ever! He even got a new icon for &lt;A target=_blank href="http://www.codeplex.com/mfcmapi" mce_href="http://www.codeplex.com/mfcmapi"&gt;MFCMAPI&lt;/A&gt; out of the deal!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9175526" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Exchange/default.aspx">Exchange</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/MAPI/default.aspx">MAPI</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Trouble with Live Search Maps Add-in for Outlook</title><link>http://blogs.msdn.com/pcreehan/archive/2008/10/22/trouble-with-live-search-maps-add-in-for-outlook.aspx</link><pubDate>Wed, 22 Oct 2008 16:08:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9011073</guid><dc:creator>Patrick Creehan</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/pcreehan/comments/9011073.aspx</comments><wfw:commentRss>http://blogs.msdn.com/pcreehan/commentrss.aspx?PostID=9011073</wfw:commentRss><description>&lt;p&gt;Several million of you have downloaded the Live Search Maps Add-in for Outlook which allows integration in Outlook with maps and has some cool functionality around extending your appointment blocks to account for automatically calculated travel time among other things.&lt;/p&gt;  &lt;p&gt;We have received a large number of support cases that are caused either directly or indirectly because of this add-in. These include hangs, crashes, and leaks. There could be any number of different reasons for those, but to name one culprit, the add-in interops with CDO 1.21, which if you are a messaging developer following the blogs of anyone on our team, you will know that this is not supported. &lt;/p&gt;  &lt;p&gt;&lt;a title="http://support.microsoft.com/kb/266353" href="http://support.microsoft.com/kb/266353"&gt;http://support.microsoft.com/kb/266353&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Worse than that, it is distributing CDO.dll, which is also not supported. &lt;a href="http://support.microsoft.com/kb/171440"&gt;http://support.microsoft.com/kb/171440&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;A customer of mine reported an issue that lead us to another discovery. The add-in installs a custom form to your Personal forms registry and changes the default form for the calendar to IPM.Appointment.Location. The form it publishes is based on the LEO.oft form that it installs in your Program Files. The OFT was clearly customized from an existing item in the designer’s mailbox. The form contains a value for PR_START_DATE and PR_END_DATE set to 4/6/2006. The problem with this is that Outlook doesn’t use PR_START_DATE and PR_END_DATE, but CDO 1.21 does and OWA will set them as well. Outlook uses custom named props to keep track of dates.&amp;#160; Exchange normally keeps these custom props and PR_START/END_DATE in sync, but only if it needs to because of a modification you did from OWA or something like that. Otherwise, the original values will stick. &lt;/p&gt;  &lt;p&gt;If you have a CDO 1.21 application which filters based on a date, all the appointments you created with this form in your calendar will appear to be on 4/6/2006.&lt;/p&gt;  &lt;p&gt;The long-term plan for what to do about all the problems in this add-in has not been determined at the time of writing of this blog, but it may result in the download being removed from microsoft.com. This won’t help you fix up any items that already exist in your calendar though – nor will it prevent users from using the add-in if they already have it downloaded and installed. &lt;/p&gt;  &lt;p&gt;If you insist on continuing to use the add-in, then please at least use &lt;a title="Updated OFT file in ZIP format" href="http://patrick.creehan.members.winisp.net/Files/LEO.zip"&gt;this updated form&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;You will need to publish this form to your Personal Forms library over the original. If you uncomfortable with that, you can &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Uninstall the add-in using Add/Remove Programs. &lt;/li&gt;    &lt;li&gt;Remove the existing form from your Personal forms library, &lt;/li&gt;    &lt;li&gt;Close Outlook and ensure no instances of Outlook.exe are running in Task Manager. &lt;/li&gt;    &lt;li&gt;Reinstall the add-in, &lt;/li&gt;    &lt;li&gt;Replace the LEO.oft in the Program Files folder (C:\Program Files\Live Search Maps for Outlook) with the one contained in the ZIP file linked above. &lt;/li&gt;    &lt;li&gt;Open Outlook. (the add-in will publish your new form). &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;This should allow your CDO 1.21 code to execute normally on any newly created items. For existing items, you can use Outlook Object Model or CDO 1.21 (or Extended MAPI) code to loop through the appointments in your calendar and delete the PR_START_DATE and PR_END_DATE properties if they are on 4/6/2006 with a message class of IPM.Appointment.Location. Outlook should still be able to work with the appointment just fine without those properties.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9011073" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/CDO+1.21/default.aspx">CDO 1.21</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Misha Shneerson : COM Interop: Handling events has side effects</title><link>http://blogs.msdn.com/pcreehan/archive/2008/10/22/misha-shneerson-com-interop-handling-events-has-side-effects.aspx</link><pubDate>Wed, 22 Oct 2008 16:04:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9011064</guid><dc:creator>Patrick Creehan</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/pcreehan/comments/9011064.aspx</comments><wfw:commentRss>http://blogs.msdn.com/pcreehan/commentrss.aspx?PostID=9011064</wfw:commentRss><description>&lt;p&gt; Misha, a Senior Dev on the VSTO team just posted this blog describing why handling events in managed code can be problematic. This is not news to our team, but he provides a good explanation of why it’s problematic. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/mshneer/archive/2008/10/18/com-interop-handling-events-has-side-effects.aspx"&gt;Misha Shneerson : COM Interop: Handling events has side effects&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If any of what he says sounds familiar, it’s because our own &lt;a href="http://blogs.msdn.com/mstehle"&gt;Matt Stehle&lt;/a&gt; has been talking about this &lt;a href="http://blogs.msdn.com/mstehle/archive/2008/06/12/oom-net-part-5-event-planning.aspx"&gt;for a while&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9011064" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook+Object+Model/default.aspx">Outlook Object Model</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Forwarding Appointments in Outlook Prepopulates “To” Field With All Attendees</title><link>http://blogs.msdn.com/pcreehan/archive/2008/09/19/forwarding-appointments-in-outlook-prepopulates-to-field-with-all-attendees.aspx</link><pubDate>Fri, 19 Sep 2008 20:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8959149</guid><dc:creator>Patrick Creehan</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/pcreehan/comments/8959149.aspx</comments><wfw:commentRss>http://blogs.msdn.com/pcreehan/commentrss.aspx?PostID=8959149</wfw:commentRss><description>We’ve had a lot of folks calling in recently about this one. The symptoms are that if you go to your calendar in Outlook and forward a meeting, the To field is prepopulated with all attendees of the meeting and the Subject field is not prefixed with “FW:.”...(&lt;a href="http://blogs.msdn.com/pcreehan/archive/2008/09/19/forwarding-appointments-in-outlook-prepopulates-to-field-with-all-attendees.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8959149" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Exchange/default.aspx">Exchange</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/CDO+1.21/default.aspx">CDO 1.21</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Form Region Leak in Visual Studio Tools for Office 2008 (v3) Template</title><link>http://blogs.msdn.com/pcreehan/archive/2008/08/07/form-region-leak-in-visual-studio-tools-for-office-2008-v3-template.aspx</link><pubDate>Fri, 08 Aug 2008 00:03:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8841695</guid><dc:creator>Patrick Creehan</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/pcreehan/comments/8841695.aspx</comments><wfw:commentRss>http://blogs.msdn.com/pcreehan/commentrss.aspx?PostID=8841695</wfw:commentRss><description>&lt;p&gt;I had a case on this a few months ago, but thought more folks might run into this as they start moving to form regions. By default, if you use the VSTO template for creating a form region in Outlook, the item is leaked. This can show up in a number of different symptoms, but the one we saw was that when the item was created (then saved and closed), then modified in WebDav, then they tried to modify the item again in Outlook, the user would get the error:&lt;/p&gt;  &lt;p&gt;&amp;quot;The item cannot be saved because it was changed by another user or in a another window.&amp;quot;&lt;/p&gt;  &lt;p&gt;Fortunately, the resolution is easy, you just need to add a call to Marshal.ReleaseComObject to the FormRegionInitializing event in the designer code.&lt;/p&gt; &lt;code&gt;private void FormRegion1Factory_FormRegionInitializing(object sender, Microsoft.Office.Tools.Outlook.FormRegionInitializingEventArgs e)    &lt;br /&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Marshal.ReleaseComObject(e.OutlookItem);     &lt;br /&gt;} &lt;/code&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8841695" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/pcreehan/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Two-way STSSync Protocol Server for Outlook 2007</title><link>http://blogs.msdn.com/pcreehan/archive/2008/06/10/two-way-stssync-protocol-server-for-outlook-2007.aspx</link><pubDate>Wed, 11 Jun 2008 00:53:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8590474</guid><dc:creator>Patrick Creehan</dc:creator><slash:comments>22</slash:comments><comments>http://blogs.msdn.com/pcreehan/comments/8590474.aspx</comments><wfw:commentRss>http://blogs.msdn.com/pcreehan/commentrss.aspx?PostID=8590474</wfw:commentRss><description>&lt;p&gt;So I've finally done it. I made the first stab at a two-way stssync protocol server. You can get it here:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.codeplex.com/stssyncprovider"&gt;http://www.codeplex.com/stssyncprovider&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I'd love to have some of you start using it and report issues you find with it so I can continue to improve it. I know there are issues already, but it should be mostly there to at least get you started.&lt;/p&gt;  &lt;p&gt;This was largely inspired by Stephen Toub's original &lt;a href="http://msdn.microsoft.com/en-us/library/Aa168130(office.11).aspx"&gt;Custom Calendar Provider sample&lt;/a&gt;. I'd recommend reading that article for background on this idea.&amp;#160; I later &lt;a href="http://blogs.msdn.com/pcreehan/archive/2006/11/21/custom-calendar-providers-for-outlook-2007.aspx"&gt;updated it&lt;/a&gt; to work with Outlook 2007, but this was still just using the ver=1.0 sync (one-way) . Now, with the release of the SharePoint protocol documents which &lt;a href="http://blogs.msdn.com/pcreehan/archive/2008/04/08/stssync-for-the-masses-toub-s-revenge.aspx"&gt;I announced&lt;/a&gt; some months back and troubleshooting logging in Outlook, I've been able to construct a stssync protocol server, which, like Toub's sample, allows for you to simply create a provider that snaps into the engine. &lt;/p&gt;  &lt;p&gt;My original design goal was to make it so that provider developers would only have to implement a single interface which returned a dataset of records when Outlook requests them and accepted a dataset of updates when Outlook makes changes and the rest of the plumbing would be handled by the provider engine (&amp;quot;the engine&amp;quot;). I came pretty close. Here is the interface as it stands so far:&lt;/p&gt;  &lt;div class="code" style="background-color: #eeeeee"&gt;   &lt;p&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 10pt; font-family: " courier="courier" new?;="new?;" mso-no-proof:="mso-no-proof:" yes?="yes?"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;interface&lt;/span&gt; &lt;span style="color: #2b91af"&gt;IProvider &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 10pt; font-family: " courier="courier" new?;="new?;" mso-no-proof:="mso-no-proof:" yes?="yes?"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;{ &lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 10pt; font-family: " courier="courier" new?;="new?;" mso-no-proof:="mso-no-proof:" yes?="yes?"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DataSet&lt;/span&gt; GetEmptyDataSet(&lt;span style="color: #2b91af"&gt;Guid&lt;/span&gt; ProviderID); &lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 10pt; font-family: " courier="courier" new?;="new?;" mso-no-proof:="mso-no-proof:" yes?="yes?"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DataRow&lt;/span&gt; GetSingleRow(&lt;span style="color: #2b91af"&gt;Guid&lt;/span&gt; ProviderID, &lt;span style="color: blue"&gt;int&lt;/span&gt; id); &lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 10pt; font-family: " courier="courier" new?;="new?;" mso-no-proof:="mso-no-proof:" yes?="yes?"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DataRow&lt;/span&gt; Update(&lt;span style="color: #2b91af"&gt;Guid&lt;/span&gt; ProviderID, &lt;span style="color: #2b91af"&gt;DataRow&lt;/span&gt; updateRow); &lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 10pt; font-family: " courier="courier" new?;="new?;" mso-no-proof:="mso-no-proof:" yes?="yes?"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DataSet&lt;/span&gt; GetUpdatesSinceToken(&lt;span style="color: #2b91af"&gt;Guid&lt;/span&gt; ProviderID, &lt;span style="color: #2b91af"&gt;ChangeKey&lt;/span&gt; changeKey); &lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 10pt; font-family: " courier="courier" new?;="new?;" mso-no-proof:="mso-no-proof:" yes?="yes?"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ListType&lt;/span&gt; GetProviderType(&lt;span style="color: #2b91af"&gt;Guid&lt;/span&gt; ProviderID); &lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 10pt; font-family: " courier="courier" new?;="new?;" mso-no-proof:="mso-no-proof:" yes?="yes?"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;StringDictionary&lt;/span&gt; GetFieldMappingsForListType(&lt;span style="color: #2b91af"&gt;Guid&lt;/span&gt; ProviderID, &lt;span style="color: #2b91af"&gt;ListType&lt;/span&gt; listType); &lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: " courier="courier" new?;="new?;" mso-no-proof:="mso-no-proof:" yes?="yes?"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So here's the explanation for the interface.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;GetEmptyDataSet: this is mostly used so that the engine can get a feel for what columns are in the table you're returning. You simply return an empty typed dataset or a standard dataset with a single (empty) table that contains the same columns you would later return filled. &lt;/li&gt;    &lt;li&gt;GetSingleRow: Pretty easy - I give you an ID, you give me back the row associated with it. &lt;/li&gt;    &lt;li&gt;Update: I give you the datarow with changes made and you pass me back the updated row (some columns may change as a result of doing the update - like Modified time, for example) &lt;/li&gt;    &lt;li&gt;GetUpdatesSinceToken: I give you a changekey from which you can extract a timestamp, or just call ToString to use the changekey as a watermark for getting changes since the last sync. You return your DataSet filled with any rows that have changed since the provided watermark (changeKey). &lt;/li&gt;    &lt;li&gt;GetProviderType: You return a value from the ListType enumeration. This tells the engine whether you're a contacts provider versus a calendar provider, task provider, discussion list provider, or document library provider (no doc library or attachment support is currently in the provider - it's tbi). &lt;/li&gt;    &lt;li&gt;GetFieldMappingsForListType - In this method you simply return a StringDictionary filled with any field name mappings the engine can use to map the columns in your dataset to column names it's familiar with. For example, you might do something like oSDict.Add(&amp;quot;myContactIDField&amp;quot;,&amp;quot;ID&amp;quot;); &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Each method is passed the ProviderID specified in the web.config for this provider. If you want to implement two different providers in the same class, you can distinguish between them using this ID, otherwise, your implementation can largely ignore this parameter - it is mostly used by the engine to get a reference to your interface.&lt;/p&gt;  &lt;p&gt;Once you've implemented the interface, just go to the web.config file for the engine and add a new Provider element. Here's a sample:&lt;/p&gt;  &lt;div style="font-family: courier; background-color: #eee"&gt;   &lt;p&gt;&amp;lt;ProviderProxy&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;Providers&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Provider Name=&amp;quot;AdventureWorks Contacts&amp;quot; ID=&amp;quot;{7765B84F-6D32-4d31-B28E-6BC615D2F187}&amp;quot; Type=&amp;quot;AdventureWorksProvider.Contacts&amp;quot; Assembly=&amp;quot;AdventureWorksProvider&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160; &amp;lt;/Providers&amp;gt;       &lt;br /&gt;&amp;lt;/ProviderProxy&amp;gt;&lt;/p&gt; &lt;/div&gt;  &lt;ul&gt;   &lt;li&gt;Name = just the display name you want to appear on the list in Outlook and on default.aspx &lt;/li&gt;    &lt;li&gt;ID = this contains a Guid that is used in invoking methods on your IProvider interface. &lt;/li&gt;    &lt;li&gt;Type = the Namespace.ClassName of the type of your IProvider interface. &lt;/li&gt;    &lt;li&gt;Assembly = the qualified assembly name of the the assembly that contains the Type specified. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Copy your assembly to the bin directory of the engine web site and the engine will automatically find your assembly. I modified the Pre- and Post-Build events on my AdventureWorks provider sample to automatically do this to simplify the debugging process.&lt;/p&gt;  &lt;p&gt;This is just a very rough draft. I wanted to have a sample up there that folks could start to work with and get some ideas. I'd love to hear your feedback and for you to help mold the project into something that is good over time. Please contact me with any issues you find or any suggestions (I know of some myself, already). I'll do my best to put out regular releases as the code base improves. I'd also love to hear what you do with it and what unique stores you start syncing with Outlook.&lt;/p&gt;  &lt;p&gt;Just as a note, in this initial release, I do not support one-way sync, just two-way (seems backwards, but the goal was to get a two way sync working).&lt;/p&gt;  &lt;p&gt;Also, I may need to change the IProvider interface definition from one release to the next as bugs/feature-completeness dictate probably in the early phases. It doesn't make sense to have an interface that's incomplete. Once I'm able to declare feature-completeness on the IProvider interface, any new enhancements or additional functionality will come in the form of additional/augmented interfaces (IProvider2, etc). &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8590474" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/STSSync/default.aspx">STSSync</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Outlook Requests Can't Get a Date</title><link>http://blogs.msdn.com/pcreehan/archive/2008/04/23/outlook-requests-can-t-get-a-date.aspx</link><pubDate>Wed, 23 Apr 2008 21:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8419622</guid><dc:creator>Patrick Creehan</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/pcreehan/comments/8419622.aspx</comments><wfw:commentRss>http://blogs.msdn.com/pcreehan/commentrss.aspx?PostID=8419622</wfw:commentRss><description>&lt;P&gt;There exists a scenario in which attendees to a meeting in Outlook will receive an updated meeting request from the originator that appears to be "out-of-date." In the InfoBar, Outlook will display a message that says "This request is out-of-date." If the attendee attempts to accept the meeting request, they get an error dialog box. Now, this is expected if there was an update that was made but a later update was already made - that's sort of what that functionality in Outlook was designed for. However, in this scenario, you see a new meeting request and very shortly after you get an update to the same meeting. It's clear that the update didn't come before the original request, so how can it be out-of-date?&lt;/P&gt;
&lt;P&gt;This scenario exists where an appointment is modified by an application using CDO 1.21. In order to get the problematic behavior, the machine running the CDO 1.21 code has to have the clock set to a time earlier than the client machine. If CDO 1.21 modifies the appointment and sends updates within the time delta between the two machines, the update will appear to Outlook to be earlier than the original request. &lt;/P&gt;
&lt;P&gt;Imagine the scenario: &lt;/P&gt;
&lt;P&gt;CLIENT_MACHINE_1 and CLIENT_MACHINE_2 have a current system time of 3:00 PM.&lt;/P&gt;
&lt;P&gt;CDO121_MACHINE has a current system time of 2:57 PM.&lt;/P&gt;
&lt;TABLE class="" cellSpacing=0 cellPadding=4 width=491 border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=53&gt;3:00 PM&lt;/TD&gt;
&lt;TD class="" vAlign=top width=436&gt;User1 on CLIENT_MACHINE_1 sends a meeting request to User2 on CLIENT_MACHINE_2.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=55&gt;3:01 PM &lt;/TD&gt;
&lt;TD class="" vAlign=top width=435&gt;User2 accepts the meeting request and the appointment is added to User2's calendar.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=56&gt;3:02 PM &lt;/TD&gt;
&lt;TD class="" vAlign=top width=434&gt;CDO 1.21 code runs on CDO121_MACHINE server and modifies the appointment on User1's calendar and sends the meeting request update (stamped 2:59 PM which is the current system time on CDO121_MACHINE) .&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=57&gt;3:03 PM&lt;/TD&gt;
&lt;TD class="" vAlign=top width=433&gt;User2 receives the updated meeting request and Outlook displays the update as being out-of-date.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;The problem boils down to a difference in meeting update behavior between Outlook and CDO 1.21. There's a sequence number property on meeting requests that Outlook increments each time an update is made to a meeting. Outlook examines this sequence number first when deciding which update is newest - this code was put in place for scenarios like this primarily for pop3 clients, which only use sequence number. The timestamp is used as a secondary factor in deciding which is newer. CDO 1.21 wasn't designed with some of these modern calendaring scenarios in mind and doesn't (and &lt;EM&gt;won't&lt;/EM&gt; ) support incrementing the sequence number - it's simply copied over as are most props.&lt;/P&gt;
&lt;P&gt;So...if everyone just synchronizes their clocks to the same time server often enough, we'll all be happy :). &lt;/P&gt;
&lt;P&gt;If you have CDO 1.21 code which causes this to occur to some of your clients, here are a few ideas that you can try:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;in your processing, don't process meetings that have the timestamp later than the current system time on the machine your code is running on. &lt;/LI&gt;
&lt;LI&gt;Push for your customer to keep machine times in their environments synchronized. This should at least minimize the impact. Clearly this won't account for scenarios where users are using home computers over a VPN or RPC/HTTP connection or using mobile devices that may have clocks synchronized to a different source.&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8419622" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Exchange/default.aspx">Exchange</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/CDO+1.21/default.aspx">CDO 1.21</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>STSSync for the Masses: Toub's Revenge</title><link>http://blogs.msdn.com/pcreehan/archive/2008/04/08/stssync-for-the-masses-toub-s-revenge.aspx</link><pubDate>Tue, 08 Apr 2008 21:13:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8369546</guid><dc:creator>Patrick Creehan</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/pcreehan/comments/8369546.aspx</comments><wfw:commentRss>http://blogs.msdn.com/pcreehan/commentrss.aspx?PostID=8369546</wfw:commentRss><description>&lt;p&gt;Many of you have been using the Custom Calendar Provider samples created by Stephen Toub and I:&lt;/p&gt;  &lt;p&gt;&lt;a title="Stephen Toub - Custom Calendar Providers for Outlook 2003" href="http://blogs.msdn.com/toub/archive/2004/05/22/139609.aspx"&gt;Stephen Toub - Custom Calendar Providers for Outlook 2003&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="dumb - Custom Calendar Providers for Outlook 2007" href="http://blogs.msdn.com/pcreehan/archive/2006/11/21/custom-calendar-providers-for-outlook-2007.aspx"&gt;Custom Calendar Providers for Outlook 2007&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The development team has finally documented pretty much everything you need to know in order to build your own STSSync provider (to replace SharePoint as our code samples do). The documentation is included in many of the newly documented &lt;a href="http://msdn2.microsoft.com/en-us/library/cc203350.aspx"&gt;Open Protocol specifications&lt;/a&gt;:&lt;/p&gt;  &lt;p&gt;&lt;a title="[MS-OUTSPS]" href="http://msdn2.microsoft.com/en-us/library/cc313169.aspx"&gt;[MS-OUTSPS] Lists Client Sync Protocol Specification&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I'm excited to see what you do with this!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8369546" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/STSSync/default.aspx">STSSync</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Outlook Crashes When Using Outlook Object Model in Multiple Threads</title><link>http://blogs.msdn.com/pcreehan/archive/2008/03/13/outlook-crashes-when-using-outlook-object-model-in-multiple-threads.aspx</link><pubDate>Thu, 13 Mar 2008 19:11:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8181574</guid><dc:creator>Patrick Creehan</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/pcreehan/comments/8181574.aspx</comments><wfw:commentRss>http://blogs.msdn.com/pcreehan/commentrss.aspx?PostID=8181574</wfw:commentRss><description>&lt;p&gt;One of the major requirements most developers are up against these days is ensuring their code runs as fast as possible. No one likes to wait for an application to run, they want seamless, invisible, instant speed. Multithreading is becoming more popular now that many desktops and certainly most servers are shipping with multiple processors or multiple cores. By spinning up multiple threads to execute many different code-paths simultaneously, you can certainly increase the performance of your application.&lt;/p&gt;  &lt;p&gt;This mentality is ever-increasingly being blended into Outlook development as well. There has been a rash of developers in recent months who are reporting problems with their Outlook add-ins crashing Outlook when doing multi-threading. While it may give the perception of a better performing add-in, the reality is that this really isn't going to help, nor will it work.&lt;/p&gt;  &lt;p&gt;Outlook Object Model is run in a &lt;a href="http://msdn2.microsoft.com/en-us/library/ms680112.aspx" target="_blank"&gt;STA&lt;/a&gt; COM server. This means that all OOM calls are executed on the main thread. If you are building an add-in that is making OOM calls from another thread (other than the main thread), then your calls need to be properly marshaled back to thread 0. For unmanaged code, you should use &lt;a href="http://msdn2.microsoft.com/en-us/library/ms678428(VS.85).aspx" target="_blank"&gt;CoMarshalInterface&lt;/a&gt; or &lt;a href="http://msdn2.microsoft.com/en-us/library/ms693316(VS.85).aspx" target="_blank"&gt;CoMarshalInterThreadInterfaceInStream&lt;/a&gt; to marshal your object pointer across threads. This will ensure your OOM calls are properly executed on thread 0. If you are writing managed code, using the OOM through COM interop by means of the PIA will actually handle this marshalling for you. &lt;/p&gt;  &lt;p&gt;All of this talk about marshalling interfaces back to the main thread begs the question, &amp;quot;What's the point?&amp;quot; If the OOM calls need to run on thread 0, why spin up a new thread to do OOM work in the first place? That's a great question. You don't gain any performance because all the calls are going to run on the same thread anyway &lt;em&gt;and&lt;/em&gt; you incur the overhead hit of doing the marshaling to begin with, so there's not really an advantage to multithreading Outlook Object Model. &lt;/p&gt;  &lt;p&gt;Here are some links to some smart folks talking about this same thing:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://weblogs.asp.net/whaggard/archive/2008/02/04/all-outlook-object-model-calls-run-on-the-main-thread.aspx" href="http://weblogs.asp.net/whaggard/archive/2008/02/04/all-outlook-object-model-calls-run-on-the-main-thread.aspx" target="_blank"&gt;All Outlook object model calls run on the main thread&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1858663&amp;amp;SiteID=1" href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1858663&amp;amp;SiteID=1" target="_blank"&gt;Threading in an Outlook Addin&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="Add-in threading issue causes Outlook to crash or hang" href="http://www.outlookcode.com/article.aspx?id=71" target="_blank"&gt;Add-in threading issue causes Outlook to crash or hang&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8181574" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook+Object+Model/default.aspx">Outlook Object Model</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Folder Homepage no longer works in Outlook 2007 from MAPI store providers</title><link>http://blogs.msdn.com/pcreehan/archive/2007/12/19/folder-homepage-no-longer-works-in-outlook-2007-from-mapi-store-providers.aspx</link><pubDate>Wed, 19 Dec 2007 19:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6807564</guid><dc:creator>Patrick Creehan</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/pcreehan/comments/6807564.aspx</comments><wfw:commentRss>http://blogs.msdn.com/pcreehan/commentrss.aspx?PostID=6807564</wfw:commentRss><description>&lt;P&gt;If you are developing&amp;nbsp;or have developed a MAPI store provider for use in Outlook and are trying to support folder homepages in your store, you are probably familiar with the PR_FOLDER_WEBVIEWINFO property. This property is undocumented and not supported, but I'll assume for the sake of this article that you have a read/write store and you're allowing Outlook to set that property for you. :)&lt;/P&gt;
&lt;P&gt;You may have noticed that folder homepages worked in previous versions of Outlook, but don't work in Outlook 2007. This is because we are turning off folder home pages (FHP) for non-default stores by default in Outlook 2007.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;923933" mce_href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;923933"&gt;You cannot add a URL to the Address box on the Home Page tab in Outlook 2007 (923933)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Simply setting the registry key below will re-enable them:&lt;/P&gt;
&lt;P&gt;\Software\Policies\Microsoft\Office\12.0\Outlook\Security &lt;BR&gt;"NonDefaultStoreScript"=dword:00000001&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6807564" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/MAPI/default.aspx">MAPI</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Tell Us Why You're Still Using ECEs</title><link>http://blogs.msdn.com/pcreehan/archive/2007/11/21/tell-us-why-you-re-still-using-eces.aspx</link><pubDate>Wed, 21 Nov 2007 18:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6456590</guid><dc:creator>Patrick Creehan</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/pcreehan/comments/6456590.aspx</comments><wfw:commentRss>http://blogs.msdn.com/pcreehan/commentrss.aspx?PostID=6456590</wfw:commentRss><description>&lt;P&gt;We want to know why you're still using ECEs as opposed to an add-in. Please hop over to &lt;A class="" title="Stephen Griffin's blog" href="http://blogs.msdn.com/stephen_griffin" target=_blank mce_href="http://blogs.msdn.com/stephen_griffin"&gt;Stephen Griffin&lt;/A&gt;'s blog and let us know: &lt;A href="http://blogs.msdn.com/stephen_griffin/archive/2007/10/12/whither-ece.aspx"&gt;http://blogs.msdn.com/stephen_griffin/archive/2007/10/12/whither-ece.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6456590" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Outlook Performance Improvement Patch Released</title><link>http://blogs.msdn.com/pcreehan/archive/2007/04/17/outlook-performance-improvement-patch-released.aspx</link><pubDate>Tue, 17 Apr 2007 16:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2163131</guid><dc:creator>Patrick Creehan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/pcreehan/comments/2163131.aspx</comments><wfw:commentRss>http://blogs.msdn.com/pcreehan/commentrss.aspx?PostID=2163131</wfw:commentRss><description>&lt;P&gt;A new patch was released recently that helps performance on Outlook 2007 noticeably. &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Important Information for BCM users:&amp;nbsp; &lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;PLEASE READ THIS ARTICLE BEFORE INSTALLING THE UPDATE:&amp;nbsp; &lt;SPAN class=MsoHyperlink&gt;&lt;A title=http://support.microsoft.com/kb/935569 href="http://support.microsoft.com/kb/935569" target=_blank&gt;http://support.microsoft.com/kb/935569&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Where do I get it:&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;The Outlook update can be found here: &lt;A href="http://www.microsoft.com/downloads/Browse.aspx?DisplayLang=en&amp;amp;nr=20&amp;amp;productId=50663FD1-DBAD-4705-B915-E4CF683E70FE&amp;amp;sortCriteria=date" target=_blank&gt;http://www.microsoft.com/downloads/Browse.aspx?DisplayLang=en&amp;amp;nr=20&amp;amp;productId=50663FD1-DBAD-4705-B915-E4CF683E70FE&amp;amp;sortCriteria=date&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;The BCM patch can be found here:&amp;nbsp; &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=b1fadb55-e4e1-4f67-a69a-3e6bf9b130f0&amp;amp;displaylang=en" target=_blank&gt;&lt;FONT color=#0000ff&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=b1fadb55-e4e1-4f67-a69a-3e6bf9b130f0&amp;amp;displaylang=en&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT color=#0000ff&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;KB Article information:&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;A href="http://support.microsoft.com/kb/933493" target=_blank&gt;http://support.microsoft.com/kb/933493&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;A href="http://support.microsoft.com/kb/932086" target=_blank&gt;&lt;FONT color=#0000ff&gt;http://support.microsoft.com/kb/932086&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2163131" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Custom Calendar Providers for Outlook 2007</title><link>http://blogs.msdn.com/pcreehan/archive/2006/11/21/custom-calendar-providers-for-outlook-2007.aspx</link><pubDate>Tue, 21 Nov 2006 15:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1115855</guid><dc:creator>Patrick Creehan</dc:creator><slash:comments>26</slash:comments><comments>http://blogs.msdn.com/pcreehan/comments/1115855.aspx</comments><wfw:commentRss>http://blogs.msdn.com/pcreehan/commentrss.aspx?PostID=1115855</wfw:commentRss><description>&lt;P&gt;So if you were using &lt;A class="" href="http://blogs.msdn.com/toub/" target=_blank mce_href="http://blogs.msdn.com/toub/"&gt;Stephen Toub's&lt;/A&gt; &lt;A class="" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_OL2003_ta/html/odc_OLOutlookCalendar.asp" target=_blank mce_href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_OL2003_ta/html/odc_OLOutlookCalendar.asp"&gt;Custom Calendar Provider sample&lt;/A&gt; for Outlook 2003, and you are testing out the awesome new Outlook 2007 features, you may have noticed that the code sample he provided doesn't work any more. Stephen is planning to update the article for 2007 eventually, but until then, here's the fix. &lt;/P&gt;
&lt;P&gt;The GetList web service method is supposed to return a &amp;lt;Fields&amp;gt; node filled with &amp;lt;Field&amp;gt; nodes that describe each field in that list, including type information, display names, read-only properties, etc. In the sample above, Stephen is not returning the &amp;lt;Fields&amp;gt; node as a part of the response. The reason is that Outlook 2003 ignored this information when it was performing the sync. Outlook 2007 is a little more intelligent in this regard and it does need this information returned. It's not a big deal when linking to a SharePoint Events list, because SharePoint always returns that data. In an effort to keep the code simple, Stephen ignored it.&lt;/P&gt;
&lt;P&gt;So the answer is that we need to add that information back in. So what you'll want to do is edit the WssListResponse.cs file as follows:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Add a new private static method called AddFieldElement as follows:&lt;/LI&gt;&lt;CODE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// Adds a Field node to the Fields parent node&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;/summary&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="parentDoc"&amp;gt;XmlDocument parent doc used for creating the new element&amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="parentNode"&amp;gt;The parent Fields node to which to add the new Field element&amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="type"&amp;gt;Type attribute&amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="colName"&amp;gt;ColName attribute&amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="name"&amp;gt;Name attribute&amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="displayName"&amp;gt;DisplayName attribute&amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="readOnly"&amp;gt;ReadOnly attribute&amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="hidden"&amp;gt;Hidden attribute&amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;param name="fromBaseType"&amp;gt;FromBaseType attribute&amp;lt;/param&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;private static XmlElement AddFieldElement(XmlDocument parentDoc,XmlNode parentNode,string type, string colName, string name, string displayName,bool readOnly, bool hidden, bool fromBaseType)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;XmlElement fieldEl = parentDoc.CreateElement(null,"Field",_wssns);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;parentNode.AppendChild(fieldEl);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(type != null)&amp;nbsp;&amp;nbsp;AddAttribute(fieldEl,null,"Type",null,type);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(colName != null)&amp;nbsp;&amp;nbsp;AddAttribute(fieldEl,null,"ColName",null,colName);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(name != null)&amp;nbsp;&amp;nbsp;AddAttribute(fieldEl,null,"Name",null,name);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(displayName != null) AddAttribute(fieldEl,null,"DisplayName",null,displayName);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(readOnly)&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(fieldEl,null,"ReadOnly",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(hidden)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(fieldEl,null,"Hidden",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(fromBaseType)&amp;nbsp;&amp;nbsp;AddAttribute(fieldEl,null,"FromBaseType",null,"TRUE");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return fieldEl;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;/CODE&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Modify the GetListDescription Method as follows:&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;CODE&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;public static XmlNode GetListDescription(string title, Guid id)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Create the response document&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;XmlDocument doc = new XmlDocument();&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Add a List element&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;XmlNode list = doc.CreateElement(null, "List",&amp;nbsp; _wssns);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;doc.AppendChild(list);&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Add attributes about the list to the List element&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "DocTemplateUrl", null, "");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "DefaultViewUrl", null, "/Lists/" + id.ToString("N") + "/AllItems.aspx");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "ID", null, id.ToString("B"));&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "Title", null, title);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "Description", null, title);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "ImageUrl", null, "/_layouts/images/itevent.gif");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "Name", null, id.ToString("N"));&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "BaseType", null, "0");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "ServerTemplate", null, "106");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "Created", null, DateTime.MinValue.AddDays(2).ToString("s").Replace("T", " "));&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "Modified", null, DateTime.MinValue.AddDays(3).ToString("s").Replace("T", " "));&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "LastDeleted", null, DateTime.MinValue.AddDays(3).ToString("s").Replace("T", " "));&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "Version", null, "0");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "Direction", null, "none");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "ThumbnailSize", null, "");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "WebImageWidth", null, "");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "WebImageHeight", null, "");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "Flags", null, "4096");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "ItemCount", null, "1"); // isn't used, so no point in recomputing size of list&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "AnonymousPermMask", null, "");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "RootFolder", null, "/Lists/" + id.ToString("N"));&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "ReadSecurity", null, "1");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "WriteSecurity", null, "1");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "Author", null, "1");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "AnonymousPermMask", null, "");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "EventSinkAssembly", null, "");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "EventSinkClass", null, "");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "EventSinkData", null, "");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "EmailInsertsFolder", null, "");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "AllowDeletion", null, "TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "AllowMultiResponses", null, "FALSE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "EnableAttachments", null, "TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "EnableModeration", null, "FALSE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "EnableVersioning", null, "FALSE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "Hidden", null, "FALSE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "MultipleDataList", null, "FALSE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "Ordered", null, "FALSE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(list, null, "ShowUser", null, "TRUE");&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Create Fields node&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;XmlElement fieldsNode = doc.CreateElement(null, "Fields",&amp;nbsp; _wssns);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;list.AppendChild(fieldsNode);&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;XmlElement tmpEl;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Append Fields&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Counter","tp_ID","ID","ID",true,false,true);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Text","nvarchar1","Title","Title",false,false,true);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"DateTime","tp_Modified","Modified","Modified",true,false,true);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"StorageTZ",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"DateTime","tp_Created","Created","Created",true,false,true);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"StorageTZ",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"User","tp_Author","Author","Created By",true,false,true);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"List",null,"UserInfo");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"User","tp_Editor","Editor","Modified By",true,false,true);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"List",null,"UserInfo");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Integer","tp_Version","owshiddenversion","owshiddenversion",true,true,true);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"SetAs",null,"owshiddenversion");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Attachments","tp_HasAttachment","Attachments","Attachments",true,false,true);&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"ModStat","tp_ModerationStatus","_ModerationStatus","Approval Status",true,true,true);&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"CanToggleHidden",null,"TRUE");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Required",null,"FALSE");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Note","ntext1","_ModerationComments","Approver Comments",true,true,true);&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"CanToggleHidden",null,"TRUE");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sortable",null,"FALSE");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Computed",null,"Edit","Edit",true,false,true);&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sortable",null,"FALSE");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Filterable",null,"FALSE");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"AuthoringInfo",null,"(link to edit item)");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Computed",null,"LinkTitleNoMenu","Title",true,false,true);&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"AuthoringInfo",null,"(linked to item)");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Dir",null,"");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"DisplayNameSrcField",null,"Title");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Computed",null,"LinkTitle","Title",true,false,true);&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"AuthoringInfo",null,"(linked to item with edit menu)");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"DisplayNameSrcField",null,"Title");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"ClassInfo",null,"Menu");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Computed",null,"SelectTitle","Select",true,true,true);&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"AuthoringInfo",null,"(web part connection)");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Dir",null,"");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sortable",null,"FALSE");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"CanToggleHidden",null,"TRUE");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Integer","tp_InstanceID","InstanceID","InstanceID",true,true,true);&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sortable",null,"TRUE");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Filterable",null,"TRUE");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Min",null,"0");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Max",null,"99991231");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Number","tp_ItemOrder","Order","Order",false,true,true);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Guid","tp_Guid","GUID","GUID",true,true,true);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"DateTime","datetime1","EventDate","Begin",false,false,true);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Format",null,"DateTime");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sealed",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Required",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Filterable",null,"FALSE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"FilterableNoRecurrence",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"DateTime","datetime2","EndDate","End",false,false,true);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Format",null,"DateTime");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sealed",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Filterable",null,"FALSE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"FilterableNoRecurrence",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Note","ntext2","Description","Description",false,false,false);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sealed",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sortable",null,"False");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Text","nvarchar","Location","Location",false,false,false);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sealed",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Recurrence","bit1","fRecurrence","Recurrence",false,false,false);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"DisplayImage",null,"recur.gif");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"HeaderImage",null,"recur.gif");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"ClassInfo",null,"Icon");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sealed",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"NoEditFormBreak",null,"TRUE");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"CrossProjectLink","bit2","WorkspaceLink","Workspace",false,false,false);&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Format",null,"EventList");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"DisplayImage",null,"mtgicon.gif");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"HeaderImage",null,"mtgicnhd.gif");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"ClassInfo",null,"Icon");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Title",null,"Meeting Workspace");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Filterable",null,"TRUE");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sealed",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Integer","int1","EventType","Event Type",false,true,false);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sealed",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Guid","uniqueidentifier1","UID","UID",false,true,false);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sealed",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"DateTime","datetime3","RecurrenceID","Recurrence ID",false,true,false);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sealed",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"CalType",null,"1");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Format",null,"ISO8601Gregorian");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Boolean","bit3","EventCanceled","Event Canceled",false,true,false);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sealed",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Integer","int2","Duration","Duration",false,true,false);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sealed",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Note","ntext3","RecurrenceData","RecurrenceData",false,true,false);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sealed",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Integer","int3","TimeZone","TimeZone",false,true,false);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sealed",null,"TRUE");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Note","ntext4","XMLTZone","XMLTZone",false,true,false);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sealed",null,"TRUE");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"Integer","int4","MasterSeriesItemID","MasterSeriesItemID",false,true,false);&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sealed",null,"TRUE");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;tmpEl = AddFieldElement(doc,fieldsNode,"URL","nvarchar3","Workspace","WorkspaceUrl",false,true,false);&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"Sealed",null,"TRUE");&lt;BR&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAttribute(tmpEl,null,"ColName2",null,"nvarchar4");&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Return the XML&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return doc;&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&lt;/P&gt;&lt;/CODE&gt;
&lt;P mce_keep="true"&gt;You'll notice that I have commented out a few lines in this method. There are probably more lines that can be commented out. We're not returning all the information that SharePoint would return, but it's not all useful to Outlook, so why clog the ethernet lines with useless data?!&lt;/P&gt;
&lt;P mce_keep="true"&gt;Anyway, once you've made those modifications, you can recompile the web application and you should be golden!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1115855" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/Outlook+2007/default.aspx">Outlook 2007</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/STSSync/default.aspx">STSSync</category><category domain="http://blogs.msdn.com/pcreehan/archive/tags/SharePoint/default.aspx">SharePoint</category></item></channel></rss>