<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.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>El blog de Lluis Franco : Add-In</title><link>http://msmvps.com/blogs/lfranco/archive/tags/Add-In/default.aspx</link><description>Tags: Add-In</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (VII)</title><link>http://msmvps.com/blogs/lfranco/archive/2009/03/20/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-vii.aspx</link><pubDate>Fri, 20 Mar 2009 08:07:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1679840</guid><dc:creator>lfranco</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/lfranco/rsscomments.aspx?PostID=1679840</wfw:commentRss><comments>http://msmvps.com/blogs/lfranco/archive/2009/03/20/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-vii.aspx#comments</comments><description>&lt;p align="justify"&gt;Entradas anteriores de la serie:&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-i.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (I)&lt;/a&gt;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-ii.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (II)&lt;/a&gt;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-iii.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (III)&lt;/a&gt;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-iv.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (IV)&lt;/a&gt;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-v.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (V)&lt;/a&gt;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-vi.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (VI)&lt;/a&gt;&lt;/p&gt;
&lt;div align="justify"&gt;
&lt;hr /&gt;
&lt;/div&gt;
&lt;p align="justify"&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_C4F0/bender3.jpg"&gt;&lt;img border="0" width="244" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_C4F0/bender3_thumb.jpg" alt="bender3" height="182" title="bender3" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="justify"&gt;Han pasado unos d&amp;iacute;as desde que publiqu&amp;eacute; la &amp;uacute;ltima entrada, y es que voy absolutamente desbordado de curro.&lt;/p&gt;
&lt;p align="justify"&gt;Pero como lo prometido es deuda, vamos a proseguir con el tema, ya quedan un par de temas por ver antes de concluir la serie:&lt;/p&gt;
&lt;li&gt;
&lt;p align="justify"&gt;C&amp;oacute;mo ejecutar distintos threads y mostrar el progreso (&lt;strong&gt;Callbacks&lt;/strong&gt;). &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p align="justify"&gt;C&amp;oacute;mo distribuir nuestro complemento, creando un archivo MSI (&lt;strong&gt;Windows Installer packages&lt;/strong&gt;).&lt;/p&gt;
&lt;/li&gt;
&lt;p align="justify"&gt;Adem&amp;aacute;s, os dije que en el &amp;uacute;ltimo post publicar&amp;iacute;a el c&amp;oacute;digo fuente del proyecto&amp;hellip; y varios de vosotros ya lo hab&amp;eacute;is reclamado con insistencia :-P&lt;/p&gt;
&lt;p align="justify"&gt;De modo que vamos a hacerlo al rev&amp;eacute;s: Hoy publico el c&amp;oacute;digo fuente del proyecto, y ma&amp;ntilde;ana (espero) continuar&amp;eacute; el resto de la serie. De este modo al menos ya tendreis el c&amp;oacute;digo para jugar con &amp;eacute;l, y poder machacarme a preguntas&amp;hellip;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_7F07/ProjectExplorer.png"&gt;&lt;img border="0" width="328" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_7F07/ProjectExplorer_thumb.png" alt="ProjectExplorer" height="421" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" title="ProjectExplorer" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="justify"&gt;El proyecto incluye el c&amp;oacute;digo de ejemplo del Add-In y el proyecto de instalaci&amp;oacute;n, y lo pod&amp;eacute;is descargar desde este enlace de Skydrive:&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://cid-f3a970280830b5fe.skydrive.live.com/self.aspx/MSDN%20Samples/OutlookToMOSS/OutlookToMOSS.zip" title="http://cid-f3a970280830b5fe.skydrive.live.com/self.aspx/MSDN%20Samples/OutlookToMOSS/OutlookToMOSS.zip"&gt;http://cid-f3a970280830b5fe.skydrive.live.com/self.aspx/MSDN%20Samples/OutlookToMOSS/OutlookToMOSS.zip&lt;/a&gt;&lt;/p&gt;
&lt;p align="justify"&gt;Saludos desde Andorra,&lt;/p&gt;
** crossposting desde el blog de Lluís Franco en geeks.ms **&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1679840" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/lfranco/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Sharepoint/default.aspx">Sharepoint</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Utilidad/default.aspx">Utilidad</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Ejemplo/default.aspx">Ejemplo</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Serie/default.aspx">Serie</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/HowTo/default.aspx">HowTo</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Beerware/default.aspx">Beerware</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Add-In/default.aspx">Add-In</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/VSTO/default.aspx">VSTO</category></item><item><title>SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (VI)</title><link>http://msmvps.com/blogs/lfranco/archive/2009/03/05/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-vi.aspx</link><pubDate>Thu, 05 Mar 2009 14:57:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1675827</guid><dc:creator>lfranco</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/lfranco/rsscomments.aspx?PostID=1675827</wfw:commentRss><comments>http://msmvps.com/blogs/lfranco/archive/2009/03/05/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-vi.aspx#comments</comments><description>&lt;h4 align="justify"&gt;Entradas anteriores de la serie:&lt;/h4&gt;
&lt;p align="justify"&gt;&lt;a target="_blank" href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-i.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (I)&lt;/a&gt;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a target="_blank" href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-ii.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (II)&lt;/a&gt;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a target="_blank" href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-iii.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (III)&lt;/a&gt;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a target="_blank" href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-iv.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (IV)&lt;/a&gt;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a target="_blank" href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-v.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (V)&lt;/a&gt;&lt;/p&gt;
&lt;div align="justify"&gt;
&lt;hr /&gt;
&lt;/div&gt;
&lt;p align="justify"&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_C4F0/bender3.jpg"&gt;&lt;img border="0" width="244" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_C4F0/bender3_thumb.jpg" alt="bender3" height="182" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" title="bender3" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="justify"&gt;Ahora que parece que &lt;a target="_blank" href="http://en.wikipedia.org/wiki/Bender_(Futurama)"&gt;Bender&lt;/a&gt; est&amp;aacute; un poco m&amp;aacute;s sobrio que de costumbre, prosigamos con la serie... que sab&amp;eacute;is como se pone cuando no bebe.&lt;/p&gt;
&lt;p align="justify"&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Men&amp;uacute; del d&amp;iacute;a:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;span style="text-decoration:underline;"&gt;De primero:&lt;/span&gt; C&amp;oacute;mo guardar un fichero en una biblioteca de documentos de SharePoint manteniendo el control de versiones.&lt;/p&gt;
&lt;p align="justify"&gt;&lt;span style="text-decoration:underline;"&gt;De segundo:&lt;/span&gt; C&amp;oacute;mo modificar los metadatos del fichero una vez subido a la biblioteca (From, To, Subject).&lt;/p&gt;
&lt;p align="justify"&gt;&lt;span style="text-decoration:underline;"&gt;Postre:&lt;/span&gt; Pastel especial de la casa.&lt;/p&gt;
&lt;p align="justify"&gt;Pan, Vino y Caf&amp;eacute; incluidos&lt;/p&gt;
&lt;p align="justify"&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;El primero:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p align="justify"&gt;Es curioso, pero SharePoint en la versi&amp;oacute;n actual no implementa &amp;ldquo;de serie&amp;rdquo; ning&amp;uacute;n mecanismo para subir documentos a una librer&amp;iacute;a de documentos. Ahora que nos hemos quedado con la boca abierta, vamos a explicar algunos mecanismos para hacerlo por nuestra cuenta.&lt;/p&gt;
&lt;p align="justify"&gt;El bueno de mi t&amp;iacute;o &lt;a target="_blank" href="http://msmvps.com/blogs/rcorral/"&gt;Rodrigo&lt;/a&gt; hace un tiempo que public&amp;oacute; un post al respecto, en el cual se mostraba c&amp;oacute;mo &lt;a target="_blank" href="http://msmvps.com/blogs/rcorral/archive/2006/10/08/Subir-achivos-a-Sharepoint-desde-un-programa-en-un-equipo-remoto.aspx"&gt;subir ficheros a un SharePoint&lt;/a&gt;. Pero como &amp;eacute;l mismo dec&amp;iacute;a, la pega estaba en que usando esta t&amp;eacute;cnica no se dispon&amp;iacute;a de historial de versiones. La alternativa era crearse un WebService propio, tal y como se explica en &lt;a target="_blank" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_sp2003_ta/html/odc_writingcustomwebservicesforsppt.asp"&gt;este art&amp;iacute;culo&lt;/a&gt;, aunque es una soluci&amp;oacute;n que no siempre se puede usar. Hoy veremos una tercera alternativa que permite hacerlo sin tener que recurrir a la creaci&amp;oacute;n de un WebService. La he probado en un servidor MOSS y en un par de WSS, uno local y el otro hospedado en un hosting en USA. Y en ambos funciona perfectamente, aunque en el segundo los tiempos se demoran un poco... &lt;/p&gt;
&lt;p align="justify"&gt;Describamos los elementos que necesitamos a continuaci&amp;oacute;n:&lt;/p&gt;
&lt;p align="justify"&gt;Para empezar vamos a crear una clase &lt;strong&gt;FileInfo&lt;/strong&gt; para encapsular lo relativo al fichero que vamos a subir (nombre, propiedades, URI, y por supuesto los bytes):&lt;/p&gt;
&lt;div&gt;
&lt;div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; FileInfo&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;{            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; m_URL;            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;byte&lt;/span&gt;[] m_bytes;            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; Dictionary&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;object&lt;/span&gt;&amp;gt; m_properties;            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; ListInfo m_listInfo;            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; m_ensureFolders = &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;;            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; Uri m_uri;    &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; HasProperties            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {                &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        get &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        { &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; m_properties != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; m_properties.Count &amp;gt; 0; &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        }            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    }            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; RelativeFilePath            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {                &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        get &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        { &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; m_URL.Substring(m_URL.IndexOf(m_listInfo.m_rootFolder) + 1); &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        }            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    }          &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; Uri URI      &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {               &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        get                &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        {                    &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (m_uri == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;) m_uri = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Uri(m_URL);                    &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; m_uri;                &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        }            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; LookupName            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    {                &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        get  &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        {                    &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (m_listInfo != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; !&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.IsNullOrEmpty(m_listInfo.m_listName))   &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; m_listInfo.m_listName;      &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; URI.LocalPath;           &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        }            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; FileInfo(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; url, &lt;span style="color:#0000ff;"&gt;byte&lt;/span&gt;[] bytes, Dictionary&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;object&lt;/span&gt;&amp;gt; properties)    &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    {                &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        m_URL = url.Replace(&lt;span style="color:#006080;"&gt;&amp;quot;%20&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot; &amp;quot;&lt;/span&gt;);     &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        m_bytes = bytes;               &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        m_properties = properties;     &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    }                    &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p align="justify"&gt;A continuaci&amp;oacute;n un m&amp;eacute;todo &lt;strong&gt;Upload&lt;/strong&gt; con dos sobrecargas, que ser&amp;aacute; el que invocaremos desde la ventana encargada de mostrar el progreso de la operaci&amp;oacute;n. &amp;Eacute;ste ser&amp;aacute; el encargado de recibir la URL de destino, los bytes del fichero a subir (previamente debemos guardar el elemento de correo en un fichero o stream), las propiedades, y el elemento de correo para poder actualizar las columnas de metadatos. Este m&amp;eacute;todo &lt;strong&gt;Upload&lt;/strong&gt; ser&amp;aacute; el encargado de a su vez llamar al m&amp;eacute;todo &lt;strong&gt;TryToUpload&lt;/strong&gt;, que realmente ser&amp;aacute; el encargado de subir el fichero:&lt;/p&gt;
&lt;div&gt;
&lt;div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; Upload(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; destinationUrl, &lt;span style="color:#0000ff;"&gt;byte&lt;/span&gt;[] bytes, Dictionary&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;object&lt;/span&gt;&amp;gt; properties, Outlook.MailItem item) &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;{&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; Upload(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; FileInfo(destinationUrl, bytes, properties), item);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;}&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; Upload(FileInfo fileInfo, Outlook.MailItem item)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;{&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (fileInfo.HasProperties)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        fileInfo.m_listInfo = m_lists.Find(fileInfo);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; result = TryToUpload(fileInfo, item);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (!result &amp;amp;&amp;amp; fileInfo.m_ensureFolders)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; root = fileInfo.URI.AbsoluteUri.Replace(fileInfo.URI.AbsolutePath, &lt;span style="color:#006080;"&gt;&amp;quot;&amp;quot;&lt;/span&gt;);  &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; i = 0; i &amp;lt; fileInfo.URI.Segments.Length - 1; i++)     &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            root += fileInfo.URI.Segments;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (i &amp;gt; 1) CreateFolder(root);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        result = TryToUpload(fileInfo, item);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    }            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; result;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p align="justify"&gt;Y para terminar, el m&amp;eacute;todo &lt;strong&gt;TryToUpload&lt;/strong&gt; que se encarga de crear el objeto &lt;strong&gt;WebRequest&lt;/strong&gt; necesario, crear el stream y actualizar los valores de las propiedades de los campos, para invocar finalmente el m&amp;eacute;todo &lt;strong&gt;UpdateListItems&lt;/strong&gt; del servicio Web:&lt;/p&gt;
&lt;div&gt;
&lt;div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; TryToUpload(FileInfo fileInfo, Outlook.MailItem item)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;{&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;try&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        WebRequest request = WebRequest.Create(fileInfo.m_URL);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        request.Credentials = sharePointLists.Credentials;  &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        request.Method = &lt;span style="color:#006080;"&gt;&amp;quot;PUT&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;byte&lt;/span&gt;[] buffer = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;byte&lt;/span&gt;[1024];&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; (Stream stream = request.GetRequestStream())&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; (MemoryStream ms = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; MemoryStream(fileInfo.m_bytes))&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; i = ms.Read(buffer, 0, buffer.Length); i &amp;gt; 0; i = ms.Read(buffer, 0, buffer.Length))&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                stream.Write(buffer, 0, i);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        WebResponse response = request.GetResponse();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        response.Close();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (fileInfo.HasProperties)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            StringBuilder sb = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; StringBuilder();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            sb.Append(&lt;span style="color:#006080;"&gt;&amp;quot;&amp;lt;Method ID=&amp;#39;1&amp;#39; Cmd=&amp;#39;Update&amp;#39;&amp;gt;&amp;lt;Field Name=&amp;#39;ID&amp;#39;/&amp;gt;&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            sb.AppendFormat(&lt;span style="color:#006080;"&gt;&amp;quot;&amp;lt;Field Name=&amp;#39;FileRef&amp;#39;&amp;gt;{0}&amp;lt;/Field&amp;gt;&amp;quot;&lt;/span&gt;, fileInfo.m_URL);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (KeyValuePair&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;object&lt;/span&gt;&amp;gt; property &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; fileInfo.m_properties)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                sb.AppendFormat(&lt;span style="color:#006080;"&gt;&amp;quot;&amp;lt;Field Name=&amp;#39;{0}&amp;#39;&amp;gt;{1}&amp;lt;/Field&amp;gt;&amp;quot;&lt;/span&gt;, property.Key, property.Value);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            updateMetadataColumns(fileInfo, item, sb);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            sb.Append(&lt;span style="color:#006080;"&gt;&amp;quot;&amp;lt;/Method&amp;gt;&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            System.Xml.XmlElement updates = (&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; System.Xml.XmlDocument()).CreateElement(&lt;span style="color:#006080;"&gt;&amp;quot;Batch&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            updates.SetAttribute(&lt;span style="color:#006080;"&gt;&amp;quot;OnError&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;Continue&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            updates.SetAttribute(&lt;span style="color:#006080;"&gt;&amp;quot;ListVersion&amp;quot;&lt;/span&gt;, fileInfo.m_listInfo.m_version);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            updates.SetAttribute(&lt;span style="color:#006080;"&gt;&amp;quot;PreCalc&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;TRUE&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            updates.InnerXml = sb.ToString();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            sharePointLists.Url = fileInfo.m_listInfo.m_webUrl + &lt;span style="color:#006080;"&gt;&amp;quot;/_vti_bin/Lists.asmx&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            XmlNode updatesResponse = sharePointLists.UpdateListItems(fileInfo.m_listInfo.m_listName, updates);    &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (updatesResponse.FirstChild.FirstChild.InnerText != &lt;span style="color:#006080;"&gt;&amp;quot;0x00000000&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Exception(&lt;span style="color:#006080;"&gt;&amp;quot;Could not update properties.&amp;quot;&lt;/span&gt;); &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;catch&lt;/span&gt; (WebException ex)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; ex;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p align="justify"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="justify"&gt;Lo juntamos todo, compilamos, probamos a subir algunos mensajes varias veces y voil&amp;aacute;! Si observamos el control de versiones veremos lo siguiente:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_C4F0/ControlVersiones.png"&gt;&lt;img border="0" width="509" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_C4F0/ControlVersiones_thumb.png" alt="ControlVersiones" height="319" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" title="ControlVersiones" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="justify"&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;El segundo:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p align="justify"&gt;Si hemos observado con atenci&amp;oacute;n el c&amp;oacute;digo del m&amp;eacute;todo TryToUpload seguramente hemos visto una llamada a un m&amp;eacute;todo updateMetaDataColumns, al cual se le pasa el StringBuilder que estamos construyendo, para que nos agregue los valores de los metadatos (cuya sintaxis que expresarse en XML seg&amp;uacute;n la &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/lists.lists.updatelistitems.aspx"&gt;ayuda del m&amp;eacute;todo UpdateListItems&lt;/a&gt;). El c&amp;oacute;digo es muy sencillo y b&amp;aacute;sicamente lo que hace es comprobar si en la lista destino existen las columnas de metadatos, y en caso afirmativo modificar su valor:&lt;/p&gt;
&lt;div&gt;
&lt;div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; updateMetadataColumns(FileInfo fileInfo, Outlook.MailItem item, StringBuilder sb)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;{&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    var cols = from c &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; SharePointExtensions.getListColumns(&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;               sharePointLists, fileInfo.m_listInfo.m_listName)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;               &lt;span style="color:#0000ff;"&gt;where&lt;/span&gt; c.Hidden == &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt; &amp;amp;&amp;amp; c.Sealed == &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt; &amp;amp;&amp;amp; c.ReadOnly == &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;               select c;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    Dictionary&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;, SPColumnInfo&amp;gt; columns = cols.ToDictionary(c =&amp;gt; c.Name);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (columns.ContainsKey(Properties.Settings.Default.COL_SUBJECT) &amp;amp;&amp;amp; item != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        sb.AppendFormat(&lt;span style="color:#006080;"&gt;&amp;quot;&amp;lt;Field Name=&amp;#39;{0}&amp;#39;&amp;gt;{1}&amp;lt;/Field&amp;gt;&amp;quot;&lt;/span&gt;,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            Properties.Settings.Default.COL_SUBJECT, item.Subject);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (columns.ContainsKey(Properties.Settings.Default.COL_FROM) &amp;amp;&amp;amp; item != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        sb.AppendFormat(&lt;span style="color:#006080;"&gt;&amp;quot;&amp;lt;Field Name=&amp;#39;{0}&amp;#39;&amp;gt;{1}&amp;lt;/Field&amp;gt;&amp;quot;&lt;/span&gt;,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            Properties.Settings.Default.COL_FROM, item.SenderName);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (columns.ContainsKey(Properties.Settings.Default.COL_TO) &amp;amp;&amp;amp; item != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        sb.AppendFormat(&lt;span style="color:#006080;"&gt;&amp;quot;&amp;lt;Field Name=&amp;#39;{0}&amp;#39;&amp;gt;{1}&amp;lt;/Field&amp;gt;&amp;quot;&lt;/span&gt;,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            Properties.Settings.Default.COL_TO, item.To);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (columns.ContainsKey(Properties.Settings.Default.COL_CC) &amp;amp;&amp;amp; item != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        sb.AppendFormat(&lt;span style="color:#006080;"&gt;&amp;quot;&amp;lt;Field Name=&amp;#39;{0}&amp;#39;&amp;gt;{1}&amp;lt;/Field&amp;gt;&amp;quot;&lt;/span&gt;,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            Properties.Settings.Default.COL_CC, item.CC);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (columns.ContainsKey(Properties.Settings.Default.COL_BCC) &amp;amp;&amp;amp; item != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        sb.AppendFormat(&lt;span style="color:#006080;"&gt;&amp;quot;&amp;lt;Field Name=&amp;#39;{0}&amp;#39;&amp;gt;{1}&amp;lt;/Field&amp;gt;&amp;quot;&lt;/span&gt;,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            Properties.Settings.Default.COL_BCC, item.BCC);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (columns.ContainsKey(Properties.Settings.Default.COL_SIZE) &amp;amp;&amp;amp; item != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        sb.AppendFormat(&lt;span style="color:#006080;"&gt;&amp;quot;&amp;lt;Field Name=&amp;#39;{0}&amp;#39;&amp;gt;{1}&amp;lt;/Field&amp;gt;&amp;quot;&lt;/span&gt;,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            Properties.Settings.Default.COL_SIZE, item.Size);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (columns.ContainsKey(Properties.Settings.Default.COL_SENT) &amp;amp;&amp;amp; item != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; dt = item.SentOn.ToString(&lt;span style="color:#006080;"&gt;&amp;quot;yyyy-MM-ddTHH:mm:ssZ&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        sb.AppendFormat(&lt;span style="color:#006080;"&gt;&amp;quot;&amp;lt;Field Name=&amp;#39;{0}&amp;#39;&amp;gt;{1}&amp;lt;/Field&amp;gt;&amp;quot;&lt;/span&gt;,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            Properties.Settings.Default.COL_SENT, dt);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (columns.ContainsKey(Properties.Settings.Default.COL_IMPORTANCE) &amp;amp;&amp;amp; item != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; im = &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Empty;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;switch&lt;/span&gt; (item.Importance)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;case&lt;/span&gt; Microsoft.Office.Interop.Outlook.OlImportance.olImportanceHigh:&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                im = Properties.Settings.Default.COL_IMPORTANCE_HIGH;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                &lt;span style="color:#0000ff;"&gt;break&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;case&lt;/span&gt; Microsoft.Office.Interop.Outlook.OlImportance.olImportanceLow:&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                im = Properties.Settings.Default.COL_IMPORTANCE_LOW;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                &lt;span style="color:#0000ff;"&gt;break&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;case&lt;/span&gt; Microsoft.Office.Interop.Outlook.OlImportance.olImportanceNormal:&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;default&lt;/span&gt;:&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                im = Properties.Settings.Default.COL_IMPORTANCE_MEDIUM;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                &lt;span style="color:#0000ff;"&gt;break&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        sb.AppendFormat(&lt;span style="color:#006080;"&gt;&amp;quot;&amp;lt;Field Name=&amp;#39;{0}&amp;#39;&amp;gt;{1}&amp;lt;/Field&amp;gt;&amp;quot;&lt;/span&gt;,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            Properties.Settings.Default.COL_IMPORTANCE, im);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p align="justify"&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;El postre:&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="justify"&gt;Ingredientes : &lt;br /&gt;125 gr. de chocolate &lt;br /&gt;60 gr. de mantequilla &lt;br /&gt;125 gr. de az&amp;uacute;car &lt;br /&gt;3 huevos &lt;br /&gt;60 gr. de maizena &lt;/p&gt;
&lt;p align="justify"&gt;Receta : &lt;br /&gt;Fundir el chocolate con la mantequilla a fuego lento. &lt;br /&gt;Separar las yemas y las claras. &lt;br /&gt;Mezclar el az&amp;uacute;car con las yemas de los huevos. &lt;br /&gt;A&amp;ntilde;adir la maicena y despu&amp;eacute;s el chocolate fundido. &lt;br /&gt;Montar las claras de huevo a punto de nieve y a&amp;ntilde;adirlas lentamente a la mezcla. &lt;br /&gt;Verter la mezcla en un molde donde se ha extendido la mantequilla previamente. &lt;br /&gt;Hornearlo entre 20 &amp;oacute; 25 minutos a 180&amp;ordm;. &lt;/p&gt;
&lt;p align="justify"&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Para terminar:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p align="justify"&gt;En los pr&amp;oacute;ximos art&amp;iacute;culos veremos c&amp;oacute;mo realizar este proceso de subida de ficheros de forma as&amp;iacute;ncrona usando callbacks, para poder continuar trabajando con Outlook y mostrar el progreso en una barra. Tambi&amp;eacute;n para cerrar la serie, veremos los pasos que hay que hacer para construir el proyecto de instalaci&amp;oacute;n de nuestro Add-In, y as&amp;iacute; poder distribuirlo.&lt;/p&gt;
&lt;p align="justify"&gt;Nos vemos!&lt;/p&gt;
** crossposting desde el blog de Lluís Franco en geeks.ms **&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1675827" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/lfranco/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Utilidad/default.aspx">Utilidad</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/XML/default.aspx">XML</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Serie/default.aspx">Serie</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Beerware/default.aspx">Beerware</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/2009/default.aspx">2009</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Add-In/default.aspx">Add-In</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/VSTO/default.aspx">VSTO</category></item><item><title>SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (V)</title><link>http://msmvps.com/blogs/lfranco/archive/2009/03/03/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-v.aspx</link><pubDate>Tue, 03 Mar 2009 17:28:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1675383</guid><dc:creator>lfranco</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/lfranco/rsscomments.aspx?PostID=1675383</wfw:commentRss><comments>http://msmvps.com/blogs/lfranco/archive/2009/03/03/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-v.aspx#comments</comments><description>&lt;p align="justify"&gt;Entradas anteriores de la serie:&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-i.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (I)&lt;/a&gt;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-ii.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (II)&lt;/a&gt;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-iii.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (III)&lt;/a&gt;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-iv.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (IV)&lt;/a&gt;&lt;/p&gt;
&lt;div align="justify"&gt;
&lt;hr /&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_D1F9/bender2.jpg"&gt;&lt;img border="0" width="126" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_D1F9/bender2_thumb.jpg" alt="bender2" height="123" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" title="bender2" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Despu&amp;eacute;s de algunos d&amp;iacute;as sin poder seguir con la serie porque &lt;span style="text-decoration:line-through;"&gt;han detenido a &lt;/span&gt;&lt;a target="_blank" href="http://en.wikipedia.org/wiki/Bender_(Futurama)"&gt;&lt;span style="text-decoration:line-through;"&gt;Bender&lt;/span&gt;&lt;/a&gt; hay que sacar adelante otros proyectos, volvemos a la carga con lo que promete ser la serie de art&amp;iacute;culos m&amp;aacute;s larga que he publicado hasta ahora en este blog.&lt;/p&gt;
&lt;p align="justify"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="justify"&gt;Antes de nada vamos a ponernos al d&amp;iacute;a:&lt;/p&gt;
&lt;p align="justify"&gt;&lt;strong&gt;Que pretendemos?&lt;/strong&gt; &lt;/p&gt;
&lt;p align="justify"&gt;Crear un add-in de Outlook que permita guardar nuestros correos en una librer&amp;iacute;a de documentos de SharePoint (tanto MOSS como WSS).&lt;/p&gt;
&lt;p align="justify"&gt;&lt;strong&gt;Que necesitamos?&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align="justify"&gt;&lt;span style="text-decoration:line-through;"&gt;&lt;span style="color:#ff0000;"&gt;C&amp;oacute;mo crear un complemento para Office (&lt;strong&gt;VSTO&lt;/strong&gt;). visto&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;&lt;span style="text-decoration:line-through;"&gt;&lt;span style="color:#ff0000;"&gt;C&amp;oacute;mo registrar acciones en los men&amp;uacute;s de la aplicaci&amp;oacute;n host (Outlook). visto&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;&lt;span style="text-decoration:line-through;"&gt;&lt;span style="color:#ff0000;"&gt;C&amp;oacute;mo conectar con un servidor MOSS/WSS con diferentes credenciales de usuario (&lt;strong&gt;System.Net.NetworkCredential&lt;/strong&gt;) visto&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;&lt;span style="text-decoration:line-through;"&gt;&lt;span style="color:#ff0000;"&gt;C&amp;oacute;mo acceder a los sitios y listas de un site de MOSS/WSS (&lt;strong&gt;servicios Web de SharePoint&lt;/strong&gt;). visto&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;&lt;span style="text-decoration:line-through;"&gt;&lt;span style="color:#ff0000;"&gt;C&amp;oacute;mo interpretar la informaci&amp;oacute;n XML devuelta por los servicios (&lt;strong&gt;LINQ to XML&lt;/strong&gt;). visto&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;C&amp;oacute;mo extender el modelo de objetos de SharePoint para acceder los valores devueltos por los servicios Web.&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;C&amp;oacute;mo crear las columnas necesarias en una lista para guardar los metadatos del elementos de correo (From, To, Subject).&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;C&amp;oacute;mo guardar un fichero en una biblioteca de documentos de SharePoint con control de versiones (&lt;strong&gt;DocLibHelper&lt;/strong&gt;). &lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;C&amp;oacute;mo ejecutar distintos threads y mostrar el progreso (&lt;strong&gt;Callbacks&lt;/strong&gt;). &lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;C&amp;oacute;mo distribuir nuestro complemento, creando un archivo MSI (&lt;strong&gt;Windows Installer packages&lt;/strong&gt;). &lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p align="justify"&gt;&lt;strong&gt;Que vamos a ver hoy?&lt;/strong&gt;&lt;/p&gt;
&lt;p align="justify"&gt;En este post vamos a centrarnos en c&amp;oacute;mo obtener datos de los servicios Web de SharePoint. En nuestro caso necesitamos obtener las colecciones de sitios, las librer&amp;iacute;as de cada uno de los sitios, y las carpetas de cada librer&amp;iacute;a para mostrarlos en una ventana que permita al usuario seleccionar la ubicaci&amp;oacute;n en la que desea guardar los elementos de coreo:&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_D1F9/AddIn_Step2.png"&gt;&lt;img border="0" width="644" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_D1F9/AddIn_Step2_thumb.png" alt="AddIn_Step2" height="446" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" title="AddIn_Step2" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="justify"&gt;Del mismo modo, vamos a necesitar obtener las columnas de la librer&amp;iacute;a seleccionada, para comprobar si ya existen las columnas para almacenar los metadatos de los elementos de correo, y en caso contrario proceder a crearlas (esto va a ir muy bien para posteriormente poder clasificar los elementos).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_D1F9/Correos1.png"&gt;&lt;img border="0" width="644" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_D1F9/Correos1_thumb.png" alt="Correos1" height="212" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" title="Correos1" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="justify"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;strong&gt;Extendiendo el modelo de objetos de SharePoint&lt;/strong&gt;&lt;/p&gt;
&lt;p align="justify"&gt;En el &lt;a target="_blank" href="http://msmvps.com/blogs/lfranco/archive/2009/02/10/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-iv.aspx"&gt;post anterior&lt;/a&gt; ya vimos que hab&amp;iacute;amos declarado algunas clases de apoyo (como la clase &amp;lsquo;SPSiteInfo&amp;rsquo;) para que nuestros m&amp;eacute;todos (como el m&amp;eacute;todo &amp;lsquo;getSiteSubSites&amp;rsquo; que tambi&amp;eacute;n vimos en el anterior post) pudiesen devolver colecciones gen&amp;eacute;ricas de &amp;eacute;estos tipos de datos, lo cual es mucho m&amp;aacute;s manejable que pelearnos con el XML que devuelven los servicios Web de SharePoint.&lt;/p&gt;
&lt;p align="justify"&gt;&lt;span style="text-decoration:underline;"&gt;Los m&amp;eacute;todos que vamos a crear son:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align="justify"&gt;getSiteSubSites: Devuelve una lista gen&amp;eacute;rica de objetos &amp;lsquo;SPSiteInfo&amp;rsquo;, a partir de un servicio Web&lt;strong&gt; websProxy.Webs&lt;/strong&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;getSiteLists: Devuelve una lista gen&amp;eacute;rica de objetos &amp;lsquo;SPListInfo&amp;rsquo;, a partir de un servicio Web &lt;strong&gt;listsProxy.Lists&lt;/strong&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;getListFolders: Devuelve una lista gen&amp;eacute;rica de objetos &amp;lsquo;SPFolderInfo&amp;rsquo;, a partir de un servicio Web &lt;strong&gt;listsProxy.Lists&lt;/strong&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;getListColumns: Devuelve una lista gen&amp;eacute;rica de objetos &amp;lsquo;SPFolderInfo&amp;rsquo;, a partir de un servicio Web &lt;strong&gt;listsProxy.Lists&lt;/strong&gt; y de un &lt;strong&gt;listID &lt;/strong&gt;(GUID)&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;createMetadataColumns: Crea las columnas de metadatos definidas en los settings del add-in en una lista, a partir de un servicio Web &lt;strong&gt;listsProxy.Lists&lt;/strong&gt; y de un &lt;strong&gt;listID&lt;/strong&gt; (GUID).&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p align="justify"&gt;Las clases de apoyo son:&lt;/p&gt;
&lt;div&gt;
&lt;div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; SPSiteInfo&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;{&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; Title { get; set; }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; URL { get; set; }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; SPSiteInfo()&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#008000;"&gt;//&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; SPSiteInfo(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; title, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; url)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        Title = title;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        URL = url;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;}&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; SPListInfo&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;{&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; Guid ID { get; set; }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; Title { get; set; }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; URL { get; set; }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; SPListInfo()&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#008000;"&gt;//&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; SPListInfo(Guid id, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; title, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; url)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        ID = id;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        Title = title;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        URL = url;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;}&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; SPFolderInfo&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;{&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; Title { get; set; }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; URL { get; set; }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; SPFolderInfo()&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#008000;"&gt;//&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; SPFolderInfo(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; title, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; url)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        Title = title;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        URL = url;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;}&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; SPColumnInfo&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;{&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; ID { get; set; }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; Type { get; set; }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; DisplayName { get; set; }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; Name { get; set; }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; Hidden { get; set; }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; Sealed { get; set; }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; ReadOnly { get; set; }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; SPColumnInfo()&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#008000;"&gt;//&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; SPColumnInfo(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; id, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; type,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; displayName, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; name, &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; hidden, &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; issealed, &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; isreadonly)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        ID = id;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        Type = type;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        DisplayName = displayName;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        Name = name;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        Hidden = hidden;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        Sealed = issealed;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        ReadOnly = isreadonly;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p align="justify"&gt;&lt;span style="text-decoration:underline;"&gt;Y el c&amp;oacute;digo de los m&amp;eacute;todos ser&amp;aacute; el siguiente:&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; SharePointExtensions&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;{&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; List&amp;lt;SPSiteInfo&amp;gt; getSiteSubSites(websProxy.Webs sharePointWebs)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;try&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            XmlNode websResult = sharePointWebs.GetWebCollection();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            XDocument results = XDocument.Parse(websResult.OuterXml);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            XName name = XName.Get(&lt;span style="color:#006080;"&gt;&amp;quot;Web&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;http://schemas.microsoft.com/sharepoint/soap/&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            var webs = from item &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; results.Descendants(name)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                       select &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; SPSiteInfo&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                           (&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                           item.Attribute(&lt;span style="color:#006080;"&gt;&amp;quot;Title&amp;quot;&lt;/span&gt;).Value,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                           item.Attribute(&lt;span style="color:#006080;"&gt;&amp;quot;Url&amp;quot;&lt;/span&gt;).Value&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                           );&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; webs.ToList();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; ex;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; List&amp;lt;SPListInfo&amp;gt; getSiteLists(listsProxy.Lists sharePointLists)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;try&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            XmlNode listsResult = sharePointLists.GetListCollection();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            XDocument results = XDocument.Parse(listsResult.OuterXml);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            XName name = XName.Get(&lt;span style="color:#006080;"&gt;&amp;quot;List&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;http://schemas.microsoft.com/sharepoint/soap/&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            var lists = from item &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; results.Descendants(name)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                        &lt;span style="color:#0000ff;"&gt;where&lt;/span&gt; item.Attribute(&lt;span style="color:#006080;"&gt;&amp;quot;ServerTemplate&amp;quot;&lt;/span&gt;).Value.ToString() ==&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                            Properties.Settings.Default.SERVER_TEMPLATE&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                        select &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; SPListInfo&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                            (&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                            &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Guid(item.Attribute(&lt;span style="color:#006080;"&gt;&amp;quot;ID&amp;quot;&lt;/span&gt;).Value),&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                            item.Attribute(&lt;span style="color:#006080;"&gt;&amp;quot;Title&amp;quot;&lt;/span&gt;).Value,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                            item.Attribute(&lt;span style="color:#006080;"&gt;&amp;quot;DefaultViewUrl&amp;quot;&lt;/span&gt;).Value&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                            );&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; lists.ToList();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; ex;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; List&amp;lt;SPFolderInfo&amp;gt; getListFolders(listsProxy.Lists sharePointLists, &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; listName, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; listText, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; folderURL)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;try&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            XmlDocument xmlDoc = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; System.Xml.XmlDocument();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            XmlNode ndQuery = xmlDoc.CreateNode(XmlNodeType.Element, &lt;span style="color:#006080;"&gt;&amp;quot;Query&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            XmlNode ndViewFields =&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;              xmlDoc.CreateNode(XmlNodeType.Element, &lt;span style="color:#006080;"&gt;&amp;quot;ViewFields&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            XmlNode ndQueryOptions = &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (listName != folderURL)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                ndQueryOptions = xmlDoc.CreateNode(&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                    XmlNodeType.Element, &lt;span style="color:#006080;"&gt;&amp;quot;QueryOptions&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                ndQueryOptions.InnerXml = &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                    &lt;span style="color:#006080;"&gt;&amp;quot;&amp;lt;Folder&amp;gt;{0}/{1}&amp;lt;/Folder&amp;gt;&amp;quot;&lt;/span&gt;, listName, folderURL);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            XName name = XName.Get(&lt;span style="color:#006080;"&gt;&amp;quot;data&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;urn:schemas-microsoft-com:rowset&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            XmlNode ndListItems =&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                    sharePointLists.GetListItems(listText, &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;, ndQuery,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                    ndViewFields, &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;, ndQueryOptions, &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            XDocument results = XDocument.Parse(ndListItems.OuterXml);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            var folders = from item &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; results.Descendants(name).Elements()&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                          &lt;span style="color:#0000ff;"&gt;where&lt;/span&gt; item.Attribute(&lt;span style="color:#006080;"&gt;&amp;quot;ows_ContentType&amp;quot;&lt;/span&gt;).Value == &lt;span style="color:#006080;"&gt;&amp;quot;Carpeta&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                          select &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; SPFolderInfo&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                             (&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                             item.Attribute(&lt;span style="color:#006080;"&gt;&amp;quot;ows_BaseName&amp;quot;&lt;/span&gt;).Value,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                             item.Attribute(&lt;span style="color:#006080;"&gt;&amp;quot;ows_ServerUrl&amp;quot;&lt;/span&gt;).Value&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                             );&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; folders.ToList();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; ex;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; List&amp;lt;SPColumnInfo&amp;gt; getListColumns(listsProxy.Lists sharePointLists, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; siteID)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;try&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            List&amp;lt;SPColumnInfo&amp;gt; columns =&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; List&amp;lt;SPColumnInfo&amp;gt;();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            XmlNode listsResult = sharePointLists.GetList(siteID);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            XDocument results = XDocument.Parse(listsResult.OuterXml);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            XName name = XName.Get(&lt;span style="color:#006080;"&gt;&amp;quot;Field&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;http://schemas.microsoft.com/sharepoint/soap/&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            var lists = from item &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; results.Descendants(name)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                        select item;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (var item &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; lists.ToList())&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                XAttribute aID = item.Attribute(&lt;span style="color:#006080;"&gt;&amp;quot;ID&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                XAttribute aType = item.Attribute(&lt;span style="color:#006080;"&gt;&amp;quot;Type&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                XAttribute aDisplayName = item.Attribute(&lt;span style="color:#006080;"&gt;&amp;quot;DisplayName&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                XAttribute aName = item.Attribute(&lt;span style="color:#006080;"&gt;&amp;quot;Name&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                XAttribute aHidden = item.Attribute(&lt;span style="color:#006080;"&gt;&amp;quot;Hidden&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                XAttribute aSealed = item.Attribute(&lt;span style="color:#006080;"&gt;&amp;quot;Sealed&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                XAttribute aReadOnly = item.Attribute(&lt;span style="color:#006080;"&gt;&amp;quot;ReadOnly&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (aID != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; aType != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; aDisplayName != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                    aName != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                    &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; ishidden = &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                    &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; issealed = &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                    &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; isreadonly = &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (aHidden != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; aHidden.Value.ToString() == &lt;span style="color:#006080;"&gt;&amp;quot;TRUE&amp;quot;&lt;/span&gt;) ishidden = &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (aSealed != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; aSealed.Value.ToString() == &lt;span style="color:#006080;"&gt;&amp;quot;TRUE&amp;quot;&lt;/span&gt;) issealed = &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (aReadOnly != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; aReadOnly.Value.ToString() == &lt;span style="color:#006080;"&gt;&amp;quot;TRUE&amp;quot;&lt;/span&gt;) isreadonly = &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                    columns.Add(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; SPColumnInfo(&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                        aID.Value.ToString(),&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                        aType.Value.ToString(),&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                        aDisplayName.Value.ToString(),&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                        aName.Value.ToString(),&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                        ishidden, issealed, isreadonly));&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; columns;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        {                &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; ex;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&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;void&lt;/span&gt; createMetadataColumns(listsProxy.Lists sharePointLists, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; listID)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; createColumnsCount = 0;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (!Properties.Settings.Default.OPTION_CREATE_METADATA_COLUMNS) &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        var cols = from c &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; SharePointExtensions.getListColumns(&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                   sharePointLists, listID)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                   &lt;span style="color:#0000ff;"&gt;where&lt;/span&gt; c.Hidden == &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt; &amp;amp;&amp;amp; c.Sealed == &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt; &amp;amp;&amp;amp; c.ReadOnly == &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                   select c;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        Dictionary&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;, SPColumnInfo&amp;gt; columns = cols.ToDictionary(c =&amp;gt; c.Name);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; newFieldsList = &lt;span style="color:#006080;"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (!columns.ContainsKey(Properties.Settings.Default.COL_SUBJECT))&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; subjectfield =&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                &lt;span style="color:#006080;"&gt;@&amp;quot;&amp;lt;Method ID=&amp;#39;1&amp;#39;&amp;gt;&amp;lt;Field Type=&amp;#39;Text&amp;#39; DisplayName=&amp;#39;{0}&amp;#39; MaxLength=&amp;#39;255&amp;#39;/&amp;gt;&amp;lt;/Method&amp;gt;&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            newFieldsList += &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(subjectfield, Properties.Settings.Default.COL_SUBJECT);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            createColumnsCount++;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (!columns.ContainsKey(Properties.Settings.Default.COL_TO))&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; subjectfield =&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                &lt;span style="color:#006080;"&gt;@&amp;quot;&amp;lt;Method ID=&amp;#39;2&amp;#39;&amp;gt;&amp;lt;Field Type=&amp;#39;Text&amp;#39; DisplayName=&amp;#39;{0}&amp;#39; MaxLength=&amp;#39;255&amp;#39;/&amp;gt;&amp;lt;/Method&amp;gt;&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            newFieldsList += &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(subjectfield, Properties.Settings.Default.COL_TO);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            createColumnsCount++;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (!columns.ContainsKey(Properties.Settings.Default.COL_CC))&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; subjectfield =&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                &lt;span style="color:#006080;"&gt;@&amp;quot;&amp;lt;Method ID=&amp;#39;3&amp;#39;&amp;gt;&amp;lt;Field Type=&amp;#39;Text&amp;#39; DisplayName=&amp;#39;{0}&amp;#39; MaxLength=&amp;#39;255&amp;#39;/&amp;gt;&amp;lt;/Method&amp;gt;&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            newFieldsList += &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(subjectfield, Properties.Settings.Default.COL_CC);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            createColumnsCount++;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (!columns.ContainsKey(Properties.Settings.Default.COL_BCC))&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; subjectfield =&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                &lt;span style="color:#006080;"&gt;@&amp;quot;&amp;lt;Method ID=&amp;#39;4&amp;#39;&amp;gt;&amp;lt;Field Type=&amp;#39;Text&amp;#39; DisplayName=&amp;#39;{0}&amp;#39; MaxLength=&amp;#39;255&amp;#39;/&amp;gt;&amp;lt;/Method&amp;gt;&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            newFieldsList += &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(subjectfield, Properties.Settings.Default.COL_BCC);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            createColumnsCount++;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (!columns.ContainsKey(Properties.Settings.Default.COL_FROM))&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; subjectfield =&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                &lt;span style="color:#006080;"&gt;@&amp;quot;&amp;lt;Method ID=&amp;#39;5&amp;#39;&amp;gt;&amp;lt;Field Type=&amp;#39;Text&amp;#39; DisplayName=&amp;#39;{0}&amp;#39; MaxLength=&amp;#39;255&amp;#39;/&amp;gt;&amp;lt;/Method&amp;gt;&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            newFieldsList += &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(subjectfield, Properties.Settings.Default.COL_FROM);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            createColumnsCount++;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (!columns.ContainsKey(Properties.Settings.Default.COL_SENT))&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; subjectfield =&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                &lt;span style="color:#006080;"&gt;@&amp;quot;&amp;lt;Method ID=&amp;#39;6&amp;#39;&amp;gt;&amp;lt;Field Type=&amp;#39;DateTime&amp;#39; DateOnly=&amp;#39;FALSE&amp;#39; DisplayName=&amp;#39;{0}&amp;#39;/&amp;gt;&amp;lt;/Method&amp;gt;&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            newFieldsList += &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(subjectfield, Properties.Settings.Default.COL_SENT);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            createColumnsCount++;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (!columns.ContainsKey(Properties.Settings.Default.COL_SIZE))&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; subjectfield =&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                &lt;span style="color:#006080;"&gt;@&amp;quot;&amp;lt;Method ID=&amp;#39;7&amp;#39;&amp;gt;&amp;lt;Field Type=&amp;#39;Number&amp;#39; DisplayName=&amp;#39;{0}&amp;#39;/&amp;gt;&amp;lt;/Method&amp;gt;&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            newFieldsList += &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(subjectfield, Properties.Settings.Default.COL_SIZE);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            createColumnsCount++;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (!columns.ContainsKey(Properties.Settings.Default.COL_IMPORTANCE))&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; subjectfield =&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                &lt;span style="color:#006080;"&gt;@&amp;quot;&amp;lt;Method ID=&amp;#39;8&amp;#39;&amp;gt;&amp;lt;Field Type=&amp;#39;Choice&amp;#39; DisplayName=&amp;#39;{0}&amp;#39;&amp;gt;&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                  &amp;lt;Default&amp;gt;{1}&amp;lt;/Default&amp;gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                  &amp;lt;CHOICES&amp;gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                    &amp;lt;CHOICE&amp;gt;{2}&amp;lt;/CHOICE&amp;gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                    &amp;lt;CHOICE&amp;gt;{3}&amp;lt;/CHOICE&amp;gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                    &amp;lt;CHOICE&amp;gt;{4}&amp;lt;/CHOICE&amp;gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                  &amp;lt;/CHOICES&amp;gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                &amp;lt;/Field&amp;gt;&amp;lt;/Method&amp;gt;&amp;quot;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            newFieldsList += &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(subjectfield,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                Properties.Settings.Default.COL_IMPORTANCE,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                Properties.Settings.Default.COL_IMPORTANCE_MEDIUM,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                Properties.Settings.Default.COL_IMPORTANCE_HIGH,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                Properties.Settings.Default.COL_IMPORTANCE_MEDIUM,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                Properties.Settings.Default.COL_IMPORTANCE_LOW);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            createColumnsCount++;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (createColumnsCount &amp;gt; 0)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            XmlNode ndList = sharePointLists.GetList(listID);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            XmlNode ndVersion = ndList.Attributes[&lt;span style="color:#006080;"&gt;&amp;quot;Version&amp;quot;&lt;/span&gt;];&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            XmlDocument xmlDoc = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; System.Xml.XmlDocument();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            XmlNode ndNewFields = xmlDoc.CreateNode(XmlNodeType.Element, &lt;span style="color:#006080;"&gt;&amp;quot;Fields&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            ndNewFields.InnerXml = newFieldsList;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;try&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                XmlNode ndReturn =&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                   sharePointLists.UpdateList(listID,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                   &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;, ndNewFields, &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                   ndVersion.Value);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; ex;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p align="justify"&gt;Y con esto ya estamos en disposici&amp;oacute;n de mostrar un cuadro de di&amp;aacute;logo al usuario, para que seleccione la ubicaci&amp;oacute;n en el servidor de SharePoint d&amp;oacute;nde quiere guardar los elementos de correo.&lt;/p&gt;
&lt;p align="justify"&gt;En el pr&amp;oacute;ximo post veremos c&amp;oacute;mo guardar los elementos de corro en la ubicaci&amp;oacute;n seleccionada, creando las columnas de metadatos (si as&amp;iacute; lo hemos definido), y actualizando el valor de &amp;eacute;stas columnas para guardar los valores de los campos de correo (Asunto, De, Para, Fecha, Tama&amp;ntilde;o, etc.).&lt;/p&gt;
&lt;p align="justify"&gt;Os recuerdo que al terminar la serie publicar&amp;eacute; la soluci&amp;oacute;n con el c&amp;oacute;digo completo, por si a alguien le sirve.&lt;/p&gt;
&lt;p align="justify"&gt;Espero no demorarme tanto en escribir el pr&amp;oacute;ximo post!&lt;/p&gt;
&lt;p align="justify"&gt;Nos vemos, un saludo desde Andorra!&lt;/p&gt;
** crossposting desde el blog de Lluís Franco en geeks.ms **&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1675383" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/lfranco/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Sharepoint/default.aspx">Sharepoint</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Utilidad/default.aspx">Utilidad</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/XML/default.aspx">XML</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Serie/default.aspx">Serie</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Beerware/default.aspx">Beerware</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Add-In/default.aspx">Add-In</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/VSTO/default.aspx">VSTO</category></item><item><title>SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (IV)</title><link>http://msmvps.com/blogs/lfranco/archive/2009/02/10/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-iv.aspx</link><pubDate>Tue, 10 Feb 2009 15:31:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1671214</guid><dc:creator>lfranco</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/lfranco/rsscomments.aspx?PostID=1671214</wfw:commentRss><comments>http://msmvps.com/blogs/lfranco/archive/2009/02/10/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-iv.aspx#comments</comments><description>&lt;p align="justify"&gt;Entradas anteriores de la serie:&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-i.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (I)&lt;/a&gt;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-ii.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (II)&lt;/a&gt;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-iii.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (III)&lt;/a&gt;&lt;/p&gt;
&lt;div align="justify"&gt;
&lt;hr /&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_B86B/bendervitruvio.jpg"&gt;&lt;img border="0" width="243" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_B86B/bendervitruvio_thumb.jpg" alt="bendervitruvio" height="244" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" title="bendervitruvio" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="justify"&gt;He estado un par de d&amp;iacute;as sin poder continuar con la serie, pero es que el trabajo aprieta y no siempre nos podemos dedicar a lo que m&amp;aacute;s nos gusta...&lt;/p&gt;
&lt;p align="justify"&gt;Recapitulando: Cosas que necesitamos para nuestro add-in:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align="justify"&gt;&lt;span style="text-decoration:line-through;"&gt;C&amp;oacute;mo crear un complemento para Office (&lt;strong&gt;VSTO&lt;/strong&gt;).&lt;/span&gt; visto en el &lt;a href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-iii.aspx"&gt;post anterior&lt;/a&gt;.&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;C&amp;oacute;mo registrar acciones en los men&amp;uacute;s de la aplicaci&amp;oacute;n host (Outlook). &lt;span style="color:#ff0000;"&gt;Lo veremos ahora.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;C&amp;oacute;mo conectar con un servidor MOSS/WSS con diferentes credenciales de usuario (&lt;strong&gt;System.Net.NetworkCredential&lt;/strong&gt;) &lt;span style="color:#ff0000;"&gt;Esto tambi&amp;eacute;n lo veremos ahora.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;&lt;span style="text-decoration:line-through;"&gt;C&amp;oacute;mo acceder a los sitios y listas de un site de MOSS/WSS (&lt;strong&gt;servicios Web de SharePoint&lt;/strong&gt;).&lt;/span&gt; visto en el &lt;a href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-iii.aspx"&gt;post anterior&lt;/a&gt;.&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;C&amp;oacute;mo interpretar la informaci&amp;oacute;n XML devuelta por los servicios (&lt;strong&gt;LINQ to XML&lt;/strong&gt;). &lt;span style="color:#ff0000;"&gt;Y esto tambi&amp;eacute;n lo veremos ahora.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;El resto de cosas las veremos en los pr&amp;oacute;ximos d&amp;iacute;as...&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p align="justify"&gt;Hoy nos centraremos en mostrar c&amp;oacute;mo agregar opciones a los men&amp;uacute;s de Outlook (para lanzar nuestras acciones personalizadas), ver c&amp;oacute;mo conectar con un sitio de SharePoint con las credenciales predeterminadas, o bien proporcionando un usuario y password. Y adem&amp;aacute;s veremos c&amp;oacute;mo interpretar el resultado devuelto por los servicios Web, ya que el usar LINQ to XML va a facilitarnos en mucho la tarea de lidiar con XML puro y duro.&lt;/p&gt;
&lt;p align="justify"&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Demos un vistazo al futuro, a lo que va a ser este Add-In (solo &lt;a target="_blank" href="http://en.wikipedia.org/wiki/Bender_(Futurama)"&gt;Bender&lt;/a&gt; puede viajar al futuro):&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p align="justify"&gt;1 - Una vez registradas nuestras propias acciones en el men&amp;uacute; de Outlook, &amp;eacute;stas permitir&amp;aacute;n guardar los elementos selecionados:&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_B86B/AddIn_Step1.png"&gt;&lt;img border="0" width="631" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_B86B/AddIn_Step1_thumb.png" alt="AddIn_Step1" height="402" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" title="AddIn_Step1" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="justify"&gt;2 &amp;ndash; Aparecer&amp;aacute; una ventana en la que podremos se leccionar la biblioteca de documentos y la carpeta destino:&lt;/p&gt;
&lt;p align="justify"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="justify"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_B86B/AddIn_Step2.png"&gt;&lt;img border="0" width="707" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_B86B/AddIn_Step2_thumb.png" alt="AddIn_Step2" height="490" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" title="AddIn_Step2" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="justify"&gt;3 &amp;ndash; Una vez seleccionada la carpeta, mostraremos una ventana de progreso en un hilo separado para que el usuario pueda seguir interactuando con Outlook:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_B86B/AddIn_Step3.png"&gt;&lt;img border="0" width="439" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_B86B/AddIn_Step3_thumb.png" alt="AddIn_Step3" height="194" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" title="AddIn_Step3" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="justify"&gt;4 &amp;ndash; Una vez terminado, si vamos a la biblioteca de documentos aparecer&amp;aacute;n los documentos (y m&amp;aacute;s adelante tambi&amp;eacute;n los metadatos):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_B86B/AddIn_Step4.png"&gt;&lt;img border="0" width="573" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_B86B/AddIn_Step4_thumb.png" alt="AddIn_Step4" height="233" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" title="AddIn_Step4" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="justify"&gt;Vayamos por partes:&lt;/p&gt;
&lt;p align="justify"&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Registrar acciones en un men&amp;uacute; de Outlook:&lt;/span&gt;&lt;/strong&gt; &lt;/p&gt;
&lt;p align="justify"&gt;Registrar el men&amp;uacute; es sencillo, s&amp;oacute;lo debemos modificar el c&amp;oacute;digo del evento &amp;lsquo;ItemContextMenuDisplay&amp;rsquo; (como ya vimos en el &lt;a href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-iii.aspx"&gt;post anterior&lt;/a&gt;), y llamar a un m&amp;eacute;todo &amp;lsquo;RegisterMenu&amp;rsquo; que se encarga de agregar nuestras acciones al men&amp;uacute; contextual de Outlook.&lt;/p&gt;
&lt;div&gt;
&lt;div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; Application_ItemContextMenuDisplay(&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    Microsoft.Office.Core.CommandBar CommandBar, &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    Microsoft.Office.Interop.Outlook.Selection Selection)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;{&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    RegisterMenu(CommandBar, &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p align="justify"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="justify"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="justify"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; RegisterMenu(Microsoft.Office.Core.CommandBar CommandBar, &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; IsFolder)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;{&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    Office.CommandBarPopup cmdSaveToMOSS = &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        (Office.CommandBarPopup)CommandBar.FindControl(&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        missing, missing, &lt;span style="color:#006080;"&gt;&amp;quot;STSMOSS&amp;quot;&lt;/span&gt;, missing, missing);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (cmdSaveToMOSS == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        cmdSaveToMOSS = (Office.CommandBarPopup)CommandBar.Controls.Add(&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                Office.MsoControlType.msoControlPopup, missing,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                missing, missing, &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (cmdSaveToMOSS != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            cmdSaveToMOSS.Caption = Properties.Resources.CONTEXT_MENU_CAPTION;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            cmdSaveToMOSS.Tag = &lt;span style="color:#006080;"&gt;&amp;quot;STMOSS&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            cmdSaveToMOSS.BeginGroup = &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            Office.CommandBarButton btnSaveToMOSS =&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                (Office.CommandBarButton)cmdSaveToMOSS.Controls.Add(&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                Office.MsoControlType.msoControlButton, missing, missing, missing, missing);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            btnSaveToMOSS.Caption = Properties.Resources.CONTEXT_MENU_SENDBUTTON;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            btnSaveToMOSS.FaceId = 65;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            btnSaveToMOSS.Tag = IsFolder.ToString();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            btnSaveToMOSS.Style = MsoButtonStyle.msoButtonIconAndCaption;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            btnSaveToMOSS.Picture = getImage();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            btnSaveToMOSS.Click += &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Microsoft.Office.Core.&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                _CommandBarButtonEvents_ClickEventHandler(saveToMOSS_Click);  &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            Office.CommandBarButton btnConfigurationMOSS =&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                (Office.CommandBarButton)cmdSaveToMOSS.Controls.Add(&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                Office.MsoControlType.msoControlButton, missing, missing, missing, missing);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            btnConfigurationMOSS.Caption = Properties.Resources.CONTEXT_MENU_CONFIGURATIONBUTTON;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            btnConfigurationMOSS.BeginGroup = &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            btnConfigurationMOSS.Style = MsoButtonStyle.msoButtonIconAndCaption;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            btnConfigurationMOSS.Click += &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Microsoft.Office.Core.&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                _CommandBarButtonEvents_ClickEventHandler(configurationMOSS_Click);  &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            cmdSaveToMOSS.Visible = &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p align="justify"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="justify"&gt;Este c&amp;oacute;digo crea un elemento men&amp;uacute; y le agrega dos opciones (&amp;lsquo;btnSaveToMOSS&amp;rsquo; y &amp;lsquo;btnConfigurationMOSS&amp;rsquo;). A continuaci&amp;oacute;n establece sus propiedades y asigna los event handlers a sendas rutinas que se ejecutar&amp;aacute;n al pulsar sobre ellas.&lt;/p&gt;
&lt;div&gt;
&lt;div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; saveToMOSS_Click(Microsoft.Office.Core.CommandBarButton Ctrl, &lt;span style="color:#0000ff;"&gt;ref&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; CancelDefault)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;{     &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    CancelDefault = &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    MessageBox.Show(&lt;span style="color:#006080;"&gt;&amp;quot;Save&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;}&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; configurationMOSS_Click(Microsoft.Office.Core.CommandBarButton Ctrl, &lt;span style="color:#0000ff;"&gt;ref&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; CancelDefault)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;{&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    CancelDefault = &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    MessageBox.Show(&lt;span style="color:#006080;"&gt;&amp;quot;Config&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p align="justify"&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Conectar con un servidor MOSS/WSS con diferentes credenciales de usuario:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p align="justify"&gt;En algunas ocasiones tal vez nos interese conectar con un sitio de SharePoint y no hacer uso de las credenciales predeterminadas (por defecto el token del usuario de Windows). En estos casos, debemos hacer uso de la clase &amp;lsquo;System.Net.NetworkCredential&amp;rsquo;, pasando los valores de usuario y password (y opcionalmente dominio) para acceder al sitio. En este caso he creado unas sencillas funciones que devuelven un objeto de tipo &amp;lsquo;ICredentials&amp;rsquo; que posteriormente usaremos en la propiedad &amp;lsquo;Credentials&amp;rsquo; de los proxies de los servicios Web:&lt;/p&gt;
&lt;div&gt;
&lt;div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; System.Net.ICredentials getCredentials()&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;{&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; System.Net.CredentialCache.DefaultCredentials;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;}&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; System.Net.ICredentials getCredentials(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; user, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; password, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; domain)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;{&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; System.Net.NetworkCredential(user, password, domain);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p align="justify"&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Interpretar el resultado devuelto por los servicios Web (LINQ to XML):&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p align="justify"&gt;En el &lt;a href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-iii.aspx"&gt;post anterior&lt;/a&gt; vimos que el resultado devuelto por los m&amp;eacute;todos de un servicio Web dista mucho de ser f&amp;aacute;cilmente interpretable, ya que nos devuelve un objeto de tipo XmlNode, de modo que debemos analizar el DOM para obtener el resultado deseado. En nuestro caso, vamos a realizar una llamada al m&amp;eacute;todo &amp;lsquo;GetWebCollection()&amp;rsquo;, que devuelve un XmlNode con los nombres de las webs (sites) de un sitio de SharePoint. Pero vamos a utilizar LINQ to XML para obtener s&amp;oacute;lo los elementos de un tipo determinado, y adem&amp;aacute;s vamos a obtener aquellos atributos que nos interesan. Y lo mejor es que todo se hace una sola sentencia:&lt;/p&gt;
&lt;div&gt;
&lt;div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; List&amp;lt;SPSiteInfo&amp;gt; getSiteSubSites(websProxy.Webs sharePointWebs)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;{&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;try&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        XmlNode websResult = sharePointWebs.GetWebCollection();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        XDocument results = XDocument.Parse(websResult.OuterXml);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        XName name = XName.Get(&lt;span style="color:#006080;"&gt;&amp;quot;Web&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;http://schemas.microsoft.com/sharepoint/soap/&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        var webs = from item &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; results.Descendants(name)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                   select &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; SPSiteInfo&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                       (&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                       item.Attribute(&lt;span style="color:#006080;"&gt;&amp;quot;Title&amp;quot;&lt;/span&gt;).Value,&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;                       item.Attribute(&lt;span style="color:#006080;"&gt;&amp;quot;Url&amp;quot;&lt;/span&gt;).Value&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                       );&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; webs.ToList();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; ex;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;A destacar en el c&amp;oacute;digo anterior el uso de un elemento &lt;a href="http://msdn.microsoft.com/en-us/library/system.xml.linq.xname.aspx"&gt;XName&lt;/a&gt; para obtener s&amp;oacute;lo los elementos de tipo Web:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_B86B/XName_Web.png"&gt;&lt;img border="0" width="696" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_B86B/XName_Web_thumb.png" alt="XName_Web" height="415" title="XName_Web" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A continuaci&amp;oacute;n basta con seleccionar los atributos deseados de cada elemento XML (en nuestro caso t&amp;iacute;tulo y url) e ir creando objetos que almacenaremos en una colecci&amp;oacute;n. Aqu&amp;iacute; utilizo una sencilla clase llamada &amp;lsquo;SPSiteInfo&amp;rsquo; para devolver una lista gen&amp;eacute;rica. Esta clase tiene s&amp;oacute;lo dos propiedades de tipo string (Title y URL) y un constructor en el que le pasamos ambos valores:&lt;/p&gt;
&lt;div&gt;
&lt;div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; SPSiteInfo&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;{&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; Title { get; set; }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; URL { get; set; }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; SPSiteInfo()&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#008000;"&gt;//&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; SPSiteInfo(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; title, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; url)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        Title = title;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        URL = url;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p align="justify"&gt;De este modo, ya tenemos una funci&amp;oacute;n que nos devuelve una colecci&amp;oacute;n de objetos &amp;lsquo;SPSiteInfo&amp;rsquo;. Emplearemos este mismo procedimiento para recuperar las bibliotecas de documentos de un sitio, las carpetas de una biblioteca de documentos, e incluso las columnas de una biblioteca de documentos.&lt;/p&gt;
&lt;p align="justify"&gt;Pero ello lo veremos en el pr&amp;oacute;ximo post, que hay que volver a las trincheras... :-)&lt;/p&gt;
&lt;p align="justify"&gt;PD &amp;ndash; Os recuerdo que al final de la serie publicar&amp;eacute; el c&amp;oacute;digo fuente del proyecto de ejemplo.&lt;/p&gt;
** crossposting desde el blog de Lluís Franco en geeks.ms **&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1671214" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/lfranco/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Sharepoint/default.aspx">Sharepoint</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Utilidad/default.aspx">Utilidad</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/XML/default.aspx">XML</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Serie/default.aspx">Serie</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Beerware/default.aspx">Beerware</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Add-In/default.aspx">Add-In</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/VSTO/default.aspx">VSTO</category></item><item><title>SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (III)</title><link>http://msmvps.com/blogs/lfranco/archive/2009/02/04/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-iii.aspx</link><pubDate>Wed, 04 Feb 2009 16:22:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1668891</guid><dc:creator>lfranco</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/lfranco/rsscomments.aspx?PostID=1668891</wfw:commentRss><comments>http://msmvps.com/blogs/lfranco/archive/2009/02/04/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-iii.aspx#comments</comments><description>&lt;p&gt;Entradas anteriores de la serie:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-i.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (I)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-ii.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (II)&lt;/a&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_936B/BenderDrinking.gif"&gt;&lt;img border="0" width="244" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_936B/BenderDrinking_thumb.gif" alt="BenderDrinking" height="235" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" title="BenderDrinking" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="justify"&gt;Bueno, vamos a empezar a trabajar en nuestro Add-In!&lt;/p&gt;
&lt;p align="justify"&gt;Aunque antes, una aclaraci&amp;oacute;n: Como la mayor&amp;iacute;a de vosotros ya sab&amp;eacute;is, en realidad qui&amp;eacute;n hace el trabajo sucio no soy yo. Yo s&amp;oacute;lo me llevo los millones y la fama, mientras que la ingrata tarea de picar c&amp;oacute;digo (que no gusta a nadie :-P) se la dejo a mi &lt;a target="_blank" href="http://en.wikipedia.org/wiki/Bender_(Futurama)"&gt;Bender&lt;/a&gt;. Efectivamente, acab&amp;aacute;is de descubrir uno de los secretos mejor guardados: Detr&amp;aacute;s de un &lt;a target="_blank" href="https://mvp.support.microsoft.com/"&gt;MVP&lt;/a&gt; siempre hay alguien haciendo el trabajo real mientras ellos se llevan el m&amp;eacute;rito... Esto ha sido as&amp;iacute; desde que el pionero &lt;a target="_blank" href="http://vigon.mvps.org/"&gt;Rub&amp;eacute;n Vig&amp;oacute;n&lt;/a&gt; ense&amp;ntilde;&amp;oacute; a codificar a su gato con Visual Basic 3.0, y poco a poco la mayor&amp;iacute;a hemos ido &amp;lsquo;adoptando&amp;rsquo; esta acertada filosof&amp;iacute;a, que en mi caso me ha permitido apartarme de estas tareas mundanas y dedicarme a mis vi&amp;ntilde;edos y mi afici&amp;oacute;n desmedida por la calceta.&lt;/p&gt;
&lt;p align="justify"&gt;As&amp;iacute; que en cuanto le propuse la idea del Add-In a &lt;a href="http://en.wikipedia.org/wiki/Bender_(Futurama)"&gt;Bender&lt;/a&gt;, le pareci&amp;oacute; que deb&amp;iacute;amos ponernos a ello en seguida (seguramente animado por la visi&amp;oacute;n de las 2 cajas de un &lt;a target="_blank" href="http://es.wikipedia.org/wiki/Chardonnay"&gt;chardonnay&lt;/a&gt; excelente que recibir&amp;aacute; como compensaci&amp;oacute;n al terminar). De modo que vamos a empezar en seguida.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p align="justify"&gt;&lt;strong&gt;Nota: Al terminar la serie publicar&amp;eacute; el proyecto de ejemplo con todo el c&amp;oacute;digo al completo. &lt;br /&gt;Un poco de paci&amp;eacute;ncia porque lo voy a ir haciendo sobre la marcha, ok?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p align="justify"&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Creando un proyecto Add-In para Outlook 2007&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p align="justify"&gt;Esta es la parte m&amp;aacute;s sencilla, ya que con Visual Studio 2008 (supongo que todos lo ten&amp;eacute;is actualizado con el SP1) se incorporan las plantillas b&amp;aacute;sicas para crear un proyecto de este tipo. Basta con iniciar un proyecto nuevo, y dentro de la categor&amp;iacute;a &amp;lsquo;Office&amp;rsquo; encontrar&amp;eacute;is las plantillas para la versi&amp;oacute;n 2007.&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_936B/OutlookAddInNewProject.png"&gt;&lt;img border="0" width="484" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_936B/OutlookAddInNewProject_thumb.png" alt="OutlookAddInNewProject" height="354" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" title="OutlookAddInNewProject" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="justify"&gt;Esto crea un proyecto C# con las referencias necesarias para ejecutarse como complemento de Outlook, y proporciona el esqueleto b&amp;aacute;sico para interceptar los eventos que se producen al cargar y descargar nuestro complemento.&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_936B/ProjectReferences.png"&gt;&lt;img border="0" width="244" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_936B/ProjectReferences_thumb.png" alt="ProjectReferences" height="213" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" title="ProjectReferences" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;div&gt;
&lt;div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; Outlook = Microsoft.Office.Interop.Outlook;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; Office = Microsoft.Office.Core;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;namespace&lt;/span&gt; OutlookToMOSS&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;{&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&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; ThisAddIn&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; ThisAddIn_Startup(&lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; sender, System.EventArgs e)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; ThisAddIn_Shutdown(&lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; sender, System.EventArgs e)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#cc6633;"&gt;#region&lt;/span&gt; VSTO generated code&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#008000;"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#008000;"&gt;/// Required method for Designer support - do not modify&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#008000;"&gt;/// the contents of this method with the code editor.&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#008000;"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; InternalStartup()&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.Startup += &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; System.EventHandler(ThisAddIn_Startup);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.Shutdown += &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; System.EventHandler(ThisAddIn_Shutdown);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#cc6633;"&gt;#endregion&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p align="justify"&gt;Observar que hay una regi&amp;oacute;n de c&amp;oacute;digo generado por el dise&amp;ntilde;ador, que es la encargada de suscribir los eventos &amp;lsquo;&lt;strong&gt;StartUp&amp;rsquo;&lt;/strong&gt; y &lt;strong&gt;&amp;lsquo;StartDown&amp;rsquo;&lt;/strong&gt;. En estos eventos, posteriormente agregaremos el c&amp;oacute;digo para inicializar y destruir nuestras referencias a los servicios Web de SharePoint. Adem&amp;aacute;s para poder interactuar con Outlook interceptaremos adem&amp;aacute;s un par de eventos m&amp;aacute;s llamados &lt;strong&gt;&amp;lsquo;ItemContextMenuDisplay&amp;rsquo;&lt;/strong&gt; y &lt;strong&gt;&amp;rsquo;FolderContextMenuDisplay&amp;rsquo;&lt;/strong&gt;, que se producen al mostrar los men&amp;uacute;s contextuales de Outlook (por ejemplo, al pulsar el bot&amp;oacute;n derecho sobre una selecci&amp;oacute;n de elementos de correo).&lt;/p&gt;
&lt;p align="justify"&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Agregando referencias a los servicios Web de SharePoint&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p align="justify"&gt;Lo primero es lo primero, as&amp;iacute; que ya que vamos a interactuar con SharePoint, vamos a agregar referencias Web a aquellos servicios que vamos a consumir. Aunque tenemos una &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/ms479390.aspx"&gt;lista de varios servicios Web&lt;/a&gt;, de entrada vamos a trabajar con estos dos, aunque probablemente a&amp;ntilde;adiremos otros m&amp;aacute;s adelante:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align="justify"&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/webs.aspx"&gt;Webs Web Service&lt;/a&gt;: Para acceder a la colecci&amp;oacute;n de sitios Web de un sitio de SharePoint.&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/lists.aspx"&gt;Lists Web Service&lt;/a&gt;: Para acceder a la colecci&amp;oacute;n de bibliotecas de documentos de un sitio.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p align="justify"&gt;Para crear la referencia debemos conocer la URL de nuestro SharePoint (por ejemplo &lt;a href="http://moss"&gt;http://moss&lt;/a&gt;). Y agregar una &amp;lsquo;Service Reference&amp;rsquo; al proyecto. Esto mostrar&amp;aacute; el cuadro de di&amp;aacute;logo para agregar servicios WCF, pero como en nuestro caso vamos a agregar una referencia a un servicio Web 2.0 hay que dar un rodeo, ir a la parte avanzada y especificar que queremos crear una &amp;lsquo;Web reference&amp;lsquo;:&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_936B/AddWebReference1.png"&gt;&lt;img border="0" width="540" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_936B/AddWebReference1_thumb.png" alt="AddWebReference1" height="449" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" title="AddWebReference1" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="justify"&gt;Pulsar en el bot&amp;oacute;n para mostrar las caracter&amp;iacute;sticas avanzadas:&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_936B/AddWebReference2.png"&gt;&lt;img border="0" width="555" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_936B/AddWebReference2_thumb.png" alt="AddWebReference2" height="528" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" title="AddWebReference2" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="justify"&gt;Especificar que deseamos agregar una &amp;lsquo;Web reference&amp;rsquo; y en la nueva ventana especificar la URL del servicio, que siempre sigue esta nomenclatura:&lt;/p&gt;
&lt;p align="justify"&gt;&amp;lt;URL Servidor SharePoint&amp;gt;/_vti_bin/&amp;lt;Nombre del servicio Web&amp;gt;&lt;/p&gt;
&lt;p align="justify"&gt;En nuestro caso:&lt;/p&gt;
&lt;p align="justify"&gt;&lt;strong&gt;http://moss/_vti_bin/Webs.asmx&lt;/strong&gt;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;strong&gt;http://moss/_vti_bin/Lists.asmx&lt;/strong&gt;&lt;/p&gt;
&lt;p align="justify"&gt;Especificando el nombre (en mi caso tengo por costumbre llamarlos websProxy y listsProxy).&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_936B/AddWebReference3.png"&gt;&lt;img border="0" width="704" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_936B/AddWebReference3_thumb.png" alt="AddWebReference3" height="503" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" title="AddWebReference3" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="justify"&gt;Una vez a&amp;ntilde;adidas veremos que en el &amp;aacute;rbol del proyecto aparece un elemento llamado &amp;lsquo;Web References&amp;rsquo; que contiene las dos referencias a los servicios Web.&lt;/p&gt;
&lt;p align="justify"&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Interceptando eventos de Outlook&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p align="justify"&gt;Ahora, para hacerlo m&amp;aacute;s interesante, antes de ejecutar vamos a interceptar el evento &lt;strong&gt;&amp;lsquo;ItemContextMenuDisplay&amp;rsquo;&lt;/strong&gt; que se produce cuando el usuario muestra el men&amp;uacute; contextual de los elementos de correo (dicho de otro modo, selecciona uno o varios emails y pulsa bot&amp;oacute;n derecho). Para ello modificaremos la secci&amp;oacute;n generada por el dise&amp;ntilde;ador, agergando la siguiente l&amp;iacute;nea al m&amp;eacute;todo &lt;strong&gt;InternalStartUp()&lt;/strong&gt;:&lt;/p&gt;
&lt;div&gt;
&lt;div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.Application.ItemContextMenuDisplay += &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Microsoft.Office.Interop.Outlook.ApplicationEvents_11_ItemContextMenuDisplayEventHandler(&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    Application_ItemContextMenuDisplay);&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;Y l&amp;oacute;gicamente ahora crearemos el m&amp;eacute;todo que ser&amp;aacute; llamado al dispararse el evento:&lt;/p&gt;
&lt;div&gt;
&lt;div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; Application_ItemContextMenuDisplay(&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            Microsoft.Office.Core.CommandBar CommandBar, &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            Microsoft.Office.Interop.Outlook.Selection Selection)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            websProxy.Webs sharePointWebs;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            sharePointWebs = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; websProxy.Webs();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            sharePointWebs.Credentials = System.Net.CredentialCache.DefaultCredentials;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            XmlNode webs = sharePointWebs.GetWebCollection();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p align="justify"&gt;Este c&amp;oacute;digo es provisional, pero nos servir&amp;aacute; para ver como se debe llamar a un m&amp;eacute;todo de un servicio Web. Primeramente se declara y se crea el objeto, a continuaci&amp;oacute;n se especifican las credenciales (en este caso las predeterminadas) y a continuaci&amp;oacute;n se llama al m&amp;eacute;todo &lt;strong&gt;GetWebCollection()&lt;/strong&gt;, el cual nos devuelve un objeto... &lt;em&gt;&amp;ldquo;oh sorpresa! oh dolor! oh campos de soledad, mustios collados...&amp;rdquo;&lt;/em&gt;, un objeto de tipo XmlNode. Efectivamente, los servicios Web de SharePoint trabajan con XML a tutipl&amp;eacute;n, con lo cual ya te aviso de que si no te gusta trabajar con XML tienes dos opciones: Dejar ahora mismo de leer este art&amp;iacute;culo escrito por &lt;a target="_blank" href="http://en.wikipedia.org/wiki/Bender_(Futurama)"&gt;Bender&lt;/a&gt; y hacer como yo disfrutando la de vida alegre, o bien esperar al pr&amp;oacute;ximo post, en el que veremos como LINQ to XML puede hacernos la vida un poco m&amp;aacute;s f&amp;aacute;cil.&lt;/p&gt;
&lt;p align="justify"&gt;Ahoravamos a establecer un punto de ruptura en la &amp;uacute;ltima l&amp;iacute;nea de c&amp;oacute;digo para ver que retorna el m&amp;eacute;todo &lt;strong&gt;GetWebCollection()&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Estamos listos para ejecutar?&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Pues si, ahora vamos a probar que sucede cuando ejecutamos nuestro proyecto. Como es un Add-In de Outlook va a arrancar &amp;eacute;ste primero y cuando hagamos click con el bot&amp;oacute;n derecho sobre un elemento de correo entrar&amp;aacute; en acci&amp;oacute;n el depurador permiti&amp;eacute;ndonos inspeccionar el valor de la variable &amp;lsquo;webs&amp;rsquo;, el cual os muestro a continuaci&amp;oacute;n, para que os asusteis un poco (hacer click en la imagen para verla m&amp;aacute;s grande):&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_936B/XmlNode_webs.png"&gt;&lt;img border="0" width="644" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_936B/XmlNode_webs_thumb.png" alt="XmlNode_webs" height="466" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" title="XmlNode_webs" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="justify"&gt;Ma&amp;ntilde;ana espero poder continuar con la serie. Y veremos c&amp;oacute;mo agregar elementos a los men&amp;uacute;s de Outlook, y c&amp;oacute;mo LINQ to XML nos va a permitir trabajar m&amp;aacute;s c&amp;oacute;modamente con los datos devueltos por los m&amp;eacute;todos de los servicios Web. Que todos sabemos de las bondades de XML, pero trabajar con atributos nunca resulta tan sencillo como trabajar con colecciones de objetos gen&amp;eacute;ricos, verdad?&lt;/p&gt;
&lt;p align="justify"&gt;Pues eso, ma&amp;ntilde;ana m&amp;aacute;s... que ahora me toca manicura y luego clase de tenis :-P&lt;/p&gt;
** crossposting desde el blog de Lluís Franco en geeks.ms **&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1668891" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/lfranco/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Sharepoint/default.aspx">Sharepoint</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Utilidad/default.aspx">Utilidad</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Serie/default.aspx">Serie</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Beerware/default.aspx">Beerware</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Add-In/default.aspx">Add-In</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/VSTO/default.aspx">VSTO</category></item><item><title>SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (II)</title><link>http://msmvps.com/blogs/lfranco/archive/2009/02/03/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-ii.aspx</link><pubDate>Tue, 03 Feb 2009 14:08:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1668523</guid><dc:creator>lfranco</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/lfranco/rsscomments.aspx?PostID=1668523</wfw:commentRss><comments>http://msmvps.com/blogs/lfranco/archive/2009/02/03/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-ii.aspx#comments</comments><description>&lt;p align="justify"&gt;Entradas anteriores de la serie:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-i.aspx"&gt;SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (I)&lt;/a&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p align="justify"&gt;Vale, vamos a empezar a escribir la carta a los reyes magos:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_B8A3/ReyesMagos.jpg"&gt;&lt;img border="0" width="244" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_B8A3/ReyesMagos_thumb.jpg" alt="Reyes-Magos" height="184" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" title="Reyes-Magos" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="justify"&gt;Queridos reyes magos,&lt;/p&gt;
&lt;p align="justify"&gt;Este a&amp;ntilde;o me he portado muy bien as&amp;iacute; que me pido un add-in para Outlook que sirva para guardar los correos en bibliotecas de documentos de SharePoint, y que tenga las siguientes cositas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align="justify"&gt;&lt;strong&gt;Que se integre con los men&amp;uacute;s de Outlook&lt;/strong&gt;, para poder seleccionar varios correos y copiarlos a la biblioteca que yo elija.&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;Que funcione &lt;strong&gt;tanto para MOSS como para WSS&lt;/strong&gt;, para poder guardar correos en un servidor WSS que tengo en hosting en USA.&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;Que permita &lt;strong&gt;cambiar la ubicaci&amp;oacute;n del servidor de SharePoint&lt;/strong&gt; para poder guardar los correos en el que me interese.&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;Que permita &lt;strong&gt;cambiar las credenciales de usuario&lt;/strong&gt;, para permitir conectarme a diferentes sitios.&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Que se encargue de &lt;strong&gt;crear las columnas necesarias para guardar los metadatos&lt;/strong&gt; del elementos de correo (De, Para, Asunto, Enviado).&lt;/li&gt;
&lt;li&gt;Que cuando guardemos una cantidad importante de correos &lt;strong&gt;no detenga la ejecuci&amp;oacute;n de Outlook&lt;/strong&gt;, y podamos seguir trabajando mientras &amp;eacute;stos se copian.&lt;/li&gt;
&lt;li&gt;Y un detalle importante:&lt;strong&gt; &lt;span style="text-decoration:underline;"&gt;Que tenga control de versiones&lt;/span&gt;&lt;/strong&gt;, por si guardo dos veces el mismo elemento que me mantenga un hist&amp;oacute;rico.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Y para desarrollar algo as&amp;iacute; necesitaremos saber varias cosas, por ejemplo:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;C&amp;oacute;mo crear un complemento para Office (&lt;strong&gt;VSTO&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;C&amp;oacute;mo conectar con un servidor MOSS/WSS con diferentes credenciales de usuario (&lt;strong&gt;System.Net.NetworkCredential&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;C&amp;oacute;mo acceder a los sitios y listas de un site de MOSS/WSS (&lt;strong&gt;servicios Web de SharePoint&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;C&amp;oacute;mo interpretar la informaci&amp;oacute;n XML devuelta por los servicios (&lt;strong&gt;LINQ to XML&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;C&amp;oacute;mo guardar un fichero en una biblioteca de documentos de SharePoint con control de versiones (&lt;strong&gt;DocLibHelper&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;C&amp;oacute;mo ejecutar distintos threads y mostrar el progreso (&lt;strong&gt;Callbacks&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;C&amp;oacute;mo distribuir nuestro complemento, creando un archivo MSI (&lt;strong&gt;Windows Installer packages&lt;/strong&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Y seguramente me dejo unas cuantas cosillas&amp;hellip; pero ya las iremos abordando a medida que nos las encontremos. Al fin y al cabo esto es un proyecto de ejemplo y personal, as&amp;iacute; que sinti&amp;eacute;ndolo mucho no voy a utilizar SCRUM ;-)&lt;/p&gt;
&lt;p&gt;Un saludo y ma&amp;ntilde;ana prometo empezar con el tema!&lt;/p&gt;
** crossposting desde el blog de Lluís Franco en geeks.ms **&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1668523" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/lfranco/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Sharepoint/default.aspx">Sharepoint</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Utilidad/default.aspx">Utilidad</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Serie/default.aspx">Serie</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Beerware/default.aspx">Beerware</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Add-In/default.aspx">Add-In</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/VSTO/default.aspx">VSTO</category></item><item><title>SharePoint 2007 + Outlook 2007: Guardar correos de forma masiva (I)</title><link>http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-i.aspx</link><pubDate>Mon, 02 Feb 2009 11:16:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1668103</guid><dc:creator>lfranco</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/lfranco/rsscomments.aspx?PostID=1668103</wfw:commentRss><comments>http://msmvps.com/blogs/lfranco/archive/2009/02/02/sharepoint-2007-outlook-2007-guardar-correos-de-forma-masiva-i.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_918C/SharePointServices.png"&gt;&lt;img border="0" width="145" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_918C/SharePointServices_thumb.png" alt="SharePointServices" height="146" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" title="SharePointServices" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Es obvio que SharePoint es uno de los mayores productos de Microsoft, y que ha supuesto una revoluci&amp;oacute;n en el entorno colaborativo empresarial. Hoy en d&amp;iacute;a esta herramienta hace posible que la informaci&amp;oacute;n fluya entre los integrantes de una organizaci&amp;oacute;n, y eso ha aumentado mucho la productividad y los procesos de trabajo de la empresa, algo que siempre agradecen los gestores :-)&lt;/p&gt;
&lt;p&gt;Es obvio tambi&amp;eacute;n que una plataforma de este calibre tiene muchas cosas a mejorar, ya que es todav&amp;iacute;a un &amp;ldquo;reci&amp;eacute;n nacido&amp;rdquo; (aunque lleve ya tres versiones como producto). De forma que hay unos cuantos huecos que deben rellenarse con horas de ardua programaci&amp;oacute;n... algo que desespera a m&amp;aacute;s de uno. Mucha gente me pregunta &amp;ldquo;&amp;iquest;pero c&amp;oacute;mo es posible que esto no est&amp;eacute; implementado?&amp;rdquo;, y mi respuesta acostumbra a ser &amp;ldquo;pueeees... no tengo ni idea chico, pero lo bueno es que disponemos de un modelo de objetos que hace posible que lo implementes tu mismo.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;La verdad es que es m&amp;aacute;s que posible que muchas de estas peque&amp;ntilde;as cositas se implementen en la futura y deseada siguiente versi&amp;oacute;n (de la que muy pocos elegidos saben algo), pero hasta entonces nos encontramos con algunas cosas que hay que hacer &amp;lsquo;a mano&amp;rsquo;.&lt;/p&gt;
&lt;p align="justify"&gt;Precisamente la &amp;uacute;ltima con la que me he encontrado (para mi sorpresa) se trata de que la integraci&amp;oacute;n de Outlook 2007 con SharePoint 2007 no es todo lo buena que deber&amp;iacute;a, o m&amp;aacute;s bien que falta alguna caracter&amp;iacute;stica que encuentro &amp;ldquo;b&amp;aacute;sica&amp;rdquo;. &lt;/p&gt;
&lt;p align="justify"&gt;En este caso se trata de la clasificaci&amp;oacute;n de elementos de correo en bibliotecas de documentos de SharePoint. Ser&amp;iacute;a estupendo poder clasificar nuestros correos en bibliotecas de documentos con un simple &amp;ldquo;Guardar como&amp;hellip;&amp;rdquo;, pero esto s&amp;oacute;lo se puede realizar cuando guardamos los correos de forma individual, ya que deben guardarse como ficheros MSG. Resulta que por alg&amp;uacute;n designio divino esta opci&amp;oacute;n no est&amp;aacute; disponible cuando seleccionamos varios elementos, y claro, ya sabemos que no es una opci&amp;oacute;n v&amp;aacute;lida para un gestor que est&amp;aacute; muy ocupado intentando salvar el mundo ;-) y menos en los tiempos que corren, en los que hay que salir de esta crisis a golpe de reuniones de high-level y comit&amp;eacute;s de direcci&amp;oacute;n, y no estamos para dilapidar el tiempo en tareas repetitivas, verdad?&lt;/p&gt;
&lt;p align="justify"&gt;&lt;a href="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_918C/correo.jpg"&gt;&lt;img border="0" width="124" src="http://blogimages.uyssoft.com/SharePoint2007Outlook2007Guardarcorreosd_918C/correo_thumb.jpg" alt="correo" height="86" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" title="correo" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="justify"&gt;Bueno, al grano que me estoy yendo... el tema es que como no he encontrado una forma de hacerlo, me he propuesto &lt;strong&gt;crear un add-in para Outlook&lt;/strong&gt;, que permita &lt;strong&gt;guardar elementos de correo en bibliotecas de documentos de SharePoint&lt;/strong&gt;. Y a medida que lo vaya desarrollando ir&amp;eacute; posteando algunas de las cosas interesantes de este desarrollo (c&amp;oacute;mo crear un proyecto de add-in para Outlook con VSTO, c&amp;oacute;mo interactuar con la aplicaci&amp;oacute;n host, acceder a los servicios Web de SharePoint, c&amp;oacute;mo distribuir el Add-In, etc). Y al final postear el c&amp;oacute;digo de ejemplo o crear un proyecto en codeplex para la comunidad. De este modo servir&amp;aacute; de ejemplo (aunque sea malo :-P) y tal vez a alguien m&amp;aacute;s podr&amp;aacute; serle &amp;uacute;til.&lt;/p&gt;
&lt;p align="justify"&gt;En el pr&amp;oacute;ximo post empezaremos a planificar el desarrollo. Saludos y hasta pronto,&lt;/p&gt;
** crossposting desde el blog de Lluís Franco en geeks.ms **&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1668103" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/lfranco/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Sharepoint/default.aspx">Sharepoint</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Utilidad/default.aspx">Utilidad</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Serie/default.aspx">Serie</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Beerware/default.aspx">Beerware</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/Add-In/default.aspx">Add-In</category><category domain="http://msmvps.com/blogs/lfranco/archive/tags/VSTO/default.aspx">VSTO</category></item></channel></rss>