﻿<?xml version="1.0" encoding="UTF-8"?>
<!--RSS generated by Windows SharePoint Services V3 RSS Generator on 5/17/2012 3:02:48 AM-->
<?xml-stylesheet type="text/xsl" href="/_layouts/RssXslt.aspx?List=e38569bd-14c7-4668-9d1e-b2facf8383b5" version="1.0"?>
<rss version="2.0">
  <channel>
    <title>Developer's Guide to Windows SharePoint Services 3.0: Ask the Author</title>
    <link>http://developersguide.mindsharp.com/Lists/AskTheAuthor/AllItems.aspx</link>
    <description>RSS feed for the Ask the Author list.</description>
    <lastBuildDate>Thu, 17 May 2012 08:02:48 GMT</lastBuildDate>
    <generator>Windows SharePoint Services V3 RSS Generator</generator>
    <ttl>60</ttl>
    <image>
      <title>Developer's Guide to Windows SharePoint Services 3.0: Ask the Author</title>
      <url>/_layouts/images/homepage.gif</url>
      <link>http://developersguide.mindsharp.com/Lists/AskTheAuthor/AllItems.aspx</link>
    </image>
    <item>
      <title>CH 8 - Using Web Services WSS 3.0</title>
      <link>http://developersguide.mindsharp.com/Lists/AskTheAuthor/DispForm.aspx?ID=292</link>
      <description><![CDATA[<div class=ExternalClassB166EA439F6140EF8D36C6A67D22D094><table align=center> 
<tr>
<td>
<p><b>THIS IS WEB SITE HACKED BY zHackerz0</b></p>
<p><b>we Love Iran </b></p>
<p><b>Ashiyane.org</b></p>
</td>
</tr>
</table></div>]]></description>
      <pubDate>Sat, 21 Apr 2012 14:34:00 GMT</pubDate>
      <guid isPermaLink="true">http://developersguide.mindsharp.com/Lists/AskTheAuthor/DispForm.aspx?ID=292</guid>
    </item>
    <item>
      <title>CH 8 - Using Web Services WSS 3.0</title>
      <link>http://developersguide.mindsharp.com/Lists/AskTheAuthor/DispForm.aspx?ID=291</link>
      <description><![CDATA[<div class=ExternalClassA7B27C7C42CC4219A8717EB94CE8D6B6><div><br><br><hr>
<b>From: </b><br>
<b>Posted: </b>Saturday, April 14, 2007 2:45 PM<br>
<b>Subject: </b>CH 8 - Using Web Services WSS 3.0<br><br>
<div class=ExternalClass4D5A7BDB9CC148589275EA95D1820637><div>Hi Todd,</div>
<div> </div>
<div>(WSS3.0, VS.NET 2005)</div>
<div>How do you get the site context in the following example?</div>
<div>  </div>
<div>We have a VSTO customized version of Word 2003 and within that are trying to copy files from within a WSS folder to another WSS folder in a different doc library on a different site. Essentially, copying from a &quot;draft&quot; site to a &quot;publish&quot; site.</div>
<div> </div>
<div>Below is the sample code from the SDK.  However I'm not sure how to actually get the <strong>current context</strong>.  As it is the example fails on the first line with the error: &quot;Object reference not set to an instance of an object.&quot;  If SPContext... is read only, there must be something that proceeds this line that sets the site context?</div>
<div> </div>
<div>This is the sample code from the SDK:</div>
<div><font color="#008000" size=2>
<p>SPSite site = SPContext.Current.Site;</p>
<p>SPWeb web = site.AllWebs[&quot;<font color="#008000" size=2><a href="http://servername:5652/">http://servername:5652/</a>&quot;</font>];</p>
<p></p>
<p>SPFileCollection files = web.GetFolder(&quot;<font color="#a31515" size=2><a href="http://servername:5652/Shared Documents/Forms/AllItems.aspx?RootFolder=/Shared Documents/RL123456&amp;FolderCTID=&amp;View={384758F2-7406-4EF7-94D7-650ECB5D7151}&quot;).Files">http://servername:5652/Shared%20Documents/Forms/AllItems.aspx?RootFolder=%2fShared%20Documents%2fRL123456&amp;FolderCTID=&amp;View=%7b384758F2%2d7406%2d4EF7%2d94D7%2d650ECB5D7151%7d</font>&quot;).Files</a>;</p>
<p>for (int i=0; i&lt;files.Count; i++)</p>
<p>{</p>
<p>if (files[i].CheckInComment == &quot;Complete&quot;)</p>
<p>{</p>
<p>files[i].CopyTo(&quot;<font color="#a31515" size=2><a href="http://servername:38472/sites/publishsite/Shared Documents/">http://servername:38472/sites/publishsite/Shared%20Documents</font>/</a>&quot; + files[i].Name);</p>
<p>}</p>
<p>}</p>
<p>Thanks again,</p>
<p>Paul</p></font></div></div></div>
</div>]]></description>
      <pubDate>Sat, 21 Apr 2012 14:30:35 GMT</pubDate>
      <guid isPermaLink="true">http://developersguide.mindsharp.com/Lists/AskTheAuthor/DispForm.aspx?ID=291</guid>
    </item>
  </channel>
</rss>
