<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Get the Path to My Documents in VBA</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2009/02/26/get-the-path-to-my-documents-in-vba/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2009/02/26/get-the-path-to-my-documents-in-vba/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Thu, 09 Feb 2012 23:42:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: File Path - The Code Cage Forums</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/02/26/get-the-path-to-my-documents-in-vba/#comment-42623</link>
		<dc:creator>File Path - The Code Cage Forums</dc:creator>
		<pubDate>Mon, 07 Dec 2009 09:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2167#comment-42623</guid>
		<description>&lt;p&gt;[...] Forums &lt;a href=&quot;http://www.thecodecage.com/forumz/excel-vba-programming/160189-file-path.html#post579392&quot; rel=&quot;nofollow&quot;&gt;http://www.thecodecage.com/forumz/excel-vba-programming/160189-file-path.html#post579392&lt;/a&gt; Daily Dose of Excel » Blog Archive » Get the Path to My Documents in VBA and here Locating Home My Documents Folder - Excel Help &amp; Excel Macro Help     [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Forums <a href="http://www.thecodecage.com/forumz/excel-vba-programming/160189-file-path.html#post579392" rel="nofollow">http://www.thecodecage.com/forumz/excel-vba-programming/160189-file-path.html#post579392</a> Daily Dose of Excel » Blog Archive » Get the Path to My Documents in VBA and here Locating Home My Documents Folder &#8211; Excel Help &amp; Excel Macro Help     [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thank you !!</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/02/26/get-the-path-to-my-documents-in-vba/#comment-40343</link>
		<dc:creator>Thank you !!</dc:creator>
		<pubDate>Sat, 25 Jul 2009 03:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2167#comment-40343</guid>
		<description>&lt;p&gt;Thanks to Mike (Alexander) .. in the environment I&#039;m working in we have roaming profiles and the my documents folder is set to a network folder, yours was the only method that actually picked up the right address so thanks a lot for posting it!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks to Mike (Alexander) .. in the environment I&#8217;m working in we have roaming profiles and the my documents folder is set to a network folder, yours was the only method that actually picked up the right address so thanks a lot for posting it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Thornton</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/02/26/get-the-path-to-my-documents-in-vba/#comment-38317</link>
		<dc:creator>Peter Thornton</dc:creator>
		<pubDate>Wed, 04 Mar 2009 17:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2167#comment-38317</guid>
		<description>&lt;p&gt;I agree with Jon the only reliable way to get the system folders is with the API. Environ can certainly fail (as in not return an expected result) in some systems and WScript might be disabled (it&#039;s also slow while the object is created).&lt;/p&gt;
&lt;p&gt;For readability use the conventionally named constants, eg&lt;br&gt;
Const CSIDL_PERSONAL = &amp;H5 &#039; my documents&lt;br&gt;
(ignore any &quot;amp;&quot; that might creep in before the &quot;H&quot;)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I agree with Jon the only reliable way to get the system folders is with the API. Environ can certainly fail (as in not return an expected result) in some systems and WScript might be disabled (it&#8217;s also slow while the object is created).</p>
<p>For readability use the conventionally named constants, eg<br />
Const CSIDL_PERSONAL = &amp;H5 &#8216; my documents<br />
(ignore any &#8220;amp;&#8221; that might creep in before the &#8220;H&#8221;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Omar</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/02/26/get-the-path-to-my-documents-in-vba/#comment-38277</link>
		<dc:creator>Omar</dc:creator>
		<pubDate>Mon, 02 Mar 2009 03:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2167#comment-38277</guid>
		<description>&lt;p&gt;Mike, my lesson is some code (found on the internet from a trustworthy source) that I&#039;m using to add and remove file folders. This particular code won&#039;t remove a folder with a hidden or system file in it. Which means most folders that have had a picture in it that has been viewed using Thumbnails. Since the purpose of these folders is to contain pictures, well you get the idea. I end up copying the list of folders that need removing to a DOS batch file and delete them that way.&lt;/p&gt;
&lt;p&gt;Since I don&#039;t understand the code, I don&#039;t know how to modify it, or whether it is even possible to modify it. &lt;/p&gt;
&lt;p&gt;I had no idea you could access Wscript from VBA. I will be looking into that possibility to do this task.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Mike, my lesson is some code (found on the internet from a trustworthy source) that I&#8217;m using to add and remove file folders. This particular code won&#8217;t remove a folder with a hidden or system file in it. Which means most folders that have had a picture in it that has been viewed using Thumbnails. Since the purpose of these folders is to contain pictures, well you get the idea. I end up copying the list of folders that need removing to a DOS batch file and delete them that way.</p>
<p>Since I don&#8217;t understand the code, I don&#8217;t know how to modify it, or whether it is even possible to modify it. </p>
<p>I had no idea you could access Wscript from VBA. I will be looking into that possibility to do this task.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Alexander</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/02/26/get-the-path-to-my-documents-in-vba/#comment-38275</link>
		<dc:creator>Mike Alexander</dc:creator>
		<pubDate>Mon, 02 Mar 2009 02:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2167#comment-38275</guid>
		<description>&lt;p&gt;Omar:&lt;br&gt;
&quot;I can actually read and follow the code..I know I could incorporate that into my projects without wondering why it worked.&quot;&lt;/p&gt;
&lt;p&gt;You know...it&#039;s funny you say that.  I recently spent some time gathering some code examples for a class I&#039;m giving and I realized that I often lean toward variations of code that I can read and understand.  I&#039;m sure that leaves me doing some things &quot;inefficiently&quot;.  But I&#039;m willing to trade some inefficiency for something I can read and explain to others. &lt;/p&gt;
&lt;p&gt;I remember Bill Jelen once told me that Aladin Akyurek (a poster on his site) creates the most amazing array formulas to solve most problems.  He tells people that if they ever get a formula from Aladin, just copy and paste it into the cell.  Don&#039;t worry how it works...it will just work.  I can, of course, appreciate the charm of that statement, but I know it would frustrate me on some level to have some formula I don&#039;t fully understand working in my spreadsheet. &lt;/p&gt;
&lt;p&gt;I guess I feel the same way about code.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Omar:<br />
&#8220;I can actually read and follow the code..I know I could incorporate that into my projects without wondering why it worked.&#8221;</p>
<p>You know&#8230;it&#8217;s funny you say that.  I recently spent some time gathering some code examples for a class I&#8217;m giving and I realized that I often lean toward variations of code that I can read and understand.  I&#8217;m sure that leaves me doing some things &#8220;inefficiently&#8221;.  But I&#8217;m willing to trade some inefficiency for something I can read and explain to others. </p>
<p>I remember Bill Jelen once told me that Aladin Akyurek (a poster on his site) creates the most amazing array formulas to solve most problems.  He tells people that if they ever get a formula from Aladin, just copy and paste it into the cell.  Don&#8217;t worry how it works&#8230;it will just work.  I can, of course, appreciate the charm of that statement, but I know it would frustrate me on some level to have some formula I don&#8217;t fully understand working in my spreadsheet. </p>
<p>I guess I feel the same way about code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Omar</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/02/26/get-the-path-to-my-documents-in-vba/#comment-38246</link>
		<dc:creator>Omar</dc:creator>
		<pubDate>Sat, 28 Feb 2009 19:23:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2167#comment-38246</guid>
		<description>&lt;p&gt;Mike, your code using Wscript correctly identified where the &quot;My Documents&quot; folder on my desktop actually resides on my computer. I&#039;m sure you knew it would! Thank you for that. &lt;/p&gt;
&lt;p&gt;I&#039;ve done a couple minor one-off type spreadsheets that relied on nobody doing what I did to my home computer. That&#039;s not optimal and was bound to backfire on me some day. Now I can fix the code.&lt;/p&gt;
&lt;p&gt;The other part I like about it is that I can actually read and follow the code. I know I could incorporate that into my projects without wondering why it worked.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Mike, your code using Wscript correctly identified where the &#8220;My Documents&#8221; folder on my desktop actually resides on my computer. I&#8217;m sure you knew it would! Thank you for that. </p>
<p>I&#8217;ve done a couple minor one-off type spreadsheets that relied on nobody doing what I did to my home computer. That&#8217;s not optimal and was bound to backfire on me some day. Now I can fix the code.</p>
<p>The other part I like about it is that I can actually read and follow the code. I know I could incorporate that into my projects without wondering why it worked.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/02/26/get-the-path-to-my-documents-in-vba/#comment-38239</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Sat, 28 Feb 2009 15:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2167#comment-38239</guid>
		<description>&lt;p&gt;&lt;a href=&quot;http://www.dailydoseofexcel.com/archives/2004/12/06/string-function-efficiency/&quot; rel=&quot;nofollow&quot;&gt;http://www.dailydoseofexcel.com/archives/2004/12/06/string-function-efficiency/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It&#039;s a habit I developed based on that article.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p><a href="http://www.dailydoseofexcel.com/archives/2004/12/06/string-function-efficiency/" rel="nofollow">http://www.dailydoseofexcel.com/archives/2004/12/06/string-function-efficiency/</a></p>
<p>It&#8217;s a habit I developed based on that article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gruff999</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/02/26/get-the-path-to-my-documents-in-vba/#comment-38237</link>
		<dc:creator>gruff999</dc:creator>
		<pubDate>Sat, 28 Feb 2009 13:20:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2167#comment-38237</guid>
		<description>&lt;p&gt;I had the environ function in my notes for a rainy day, can&#039;t remember why I Googled it in the first place. being in application support where I get to tinker with all sorts of software I&#039;m always interested in finding the &#039;joins&#039; between them. Usually knowing the strengths and capabilities of different scripting languages and software, plus where they can be joined to feed one into the next, gives me the sort of quick and dirty answers I need.&lt;/p&gt;
&lt;p&gt;But Dick specifies it as Environ$, why the $? is it purely optional or does it have a modifying effect?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I had the environ function in my notes for a rainy day, can&#8217;t remember why I Googled it in the first place. being in application support where I get to tinker with all sorts of software I&#8217;m always interested in finding the &#8216;joins&#8217; between them. Usually knowing the strengths and capabilities of different scripting languages and software, plus where they can be joined to feed one into the next, gives me the sort of quick and dirty answers I need.</p>
<p>But Dick specifies it as Environ$, why the $? is it purely optional or does it have a modifying effect?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Alexander</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/02/26/get-the-path-to-my-documents-in-vba/#comment-38217</link>
		<dc:creator>Mike Alexander</dc:creator>
		<pubDate>Fri, 27 Feb 2009 22:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2167#comment-38217</guid>
		<description>&lt;p&gt;Another way using Wscript:&lt;/p&gt;
&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container vb default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;vb codecolorer&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; GetSpecialFolderNames()&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; objFolders &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Object&lt;/span&gt;&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Set&lt;/span&gt; objFolders = CreateObject(&lt;span class=&quot;st0&quot;&gt;&quot;WScript.Shell&quot;&lt;/span&gt;).SpecialFolders&lt;br&gt;
&lt;br&gt;
MsgBox objFolders(&lt;span class=&quot;st0&quot;&gt;&quot;desktop&quot;&lt;/span&gt;)&lt;br&gt;
MsgBox objFolders(&lt;span class=&quot;st0&quot;&gt;&quot;allusersdesktop&quot;&lt;/span&gt;)&lt;br&gt;
MsgBox objFolders(&lt;span class=&quot;st0&quot;&gt;&quot;sendto&quot;&lt;/span&gt;)&lt;br&gt;
MsgBox objFolders(&lt;span class=&quot;st0&quot;&gt;&quot;startmenu&quot;&lt;/span&gt;)&lt;br&gt;
MsgBox objFolders(&lt;span class=&quot;st0&quot;&gt;&quot;recent&quot;&lt;/span&gt;)&lt;br&gt;
MsgBox objFolders(&lt;span class=&quot;st0&quot;&gt;&quot;favorites&quot;&lt;/span&gt;)&lt;br&gt;
MsgBox objFolders(&lt;span class=&quot;st0&quot;&gt;&quot;mydocuments&quot;&lt;/span&gt;)&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
</description>
		<content:encoded><![CDATA[<p>Another way using Wscript:</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Function</span> GetSpecialFolderNames()<br />
<span class="kw1">Dim</span> objFolders <span class="kw1">As</span> <span class="kw1">Object</span><br />
<span class="kw1">Set</span> objFolders = CreateObject(<span class="st0">&#8220;WScript.Shell&#8221;</span>).SpecialFolders</p>
<p>MsgBox objFolders(<span class="st0">&#8220;desktop&#8221;</span>)<br />
MsgBox objFolders(<span class="st0">&#8220;allusersdesktop&#8221;</span>)<br />
MsgBox objFolders(<span class="st0">&#8220;sendto&#8221;</span>)<br />
MsgBox objFolders(<span class="st0">&#8220;startmenu&#8221;</span>)<br />
MsgBox objFolders(<span class="st0">&#8220;recent&#8221;</span>)<br />
MsgBox objFolders(<span class="st0">&#8220;favorites&#8221;</span>)<br />
MsgBox objFolders(<span class="st0">&#8220;mydocuments&#8221;</span>)<br />
<span class="kw1">End</span> <span class="kw1">Function</span></div>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/02/26/get-the-path-to-my-documents-in-vba/#comment-38211</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Fri, 27 Feb 2009 13:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2167#comment-38211</guid>
		<description>&lt;p&gt;Environ is okay for some directory lookups, but to get them all, reliably, you need to use Windows APIs:&lt;/p&gt;
&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container vb default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;vb codecolorer&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;Private&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Declare&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; lstrlenW &lt;span class=&quot;kw1&quot;&gt;Lib&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;kernel32&quot;&lt;/span&gt; _&lt;br&gt;
&#160; &#160; (&lt;span class=&quot;kw1&quot;&gt;ByVal&lt;/span&gt; lpString &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;) &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Private&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Declare&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; SHGetFolderPath &lt;span class=&quot;kw1&quot;&gt;Lib&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;shfolder.dll&quot;&lt;/span&gt; _&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Alias&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;SHGetFolderPathA&quot;&lt;/span&gt; _&lt;br&gt;
&#160; &#160; (&lt;span class=&quot;kw1&quot;&gt;ByVal&lt;/span&gt; hwndOwner &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;, _&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;ByVal&lt;/span&gt; nFolder &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;, _&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;ByVal&lt;/span&gt; hToken &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;, _&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;ByVal&lt;/span&gt; dwReserved &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;, _&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;ByVal&lt;/span&gt; lpszPath &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;) &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; MyDocumentsDir()&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; sBuffer &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;&lt;br&gt;
&#160; &#160; sBuffer = Space$(260)&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; SHGetFolderPath(&amp;H0, &amp;H5, -1, &amp;H0, sBuffer) = 0 &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; MyDocumentsDir = Left$(sBuffer, lstrlenW(StrPtr(sBuffer)))&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt;&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
</description>
		<content:encoded><![CDATA[<p>Environ is okay for some directory lookups, but to get them all, reliably, you need to use Windows APIs:</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Private</span> <span class="kw1">Declare</span> <span class="kw1">Function</span> lstrlenW <span class="kw1">Lib</span> <span class="st0">&#8220;kernel32&#8243;</span> _<br />
&nbsp; &nbsp; (<span class="kw1">ByVal</span> lpString <span class="kw1">As</span> <span class="kw1">Long</span>) <span class="kw1">As</span> <span class="kw1">Long</span></p>
<p><span class="kw1">Private</span> <span class="kw1">Declare</span> <span class="kw1">Function</span> SHGetFolderPath <span class="kw1">Lib</span> <span class="st0">&#8220;shfolder.dll&#8221;</span> _<br />
&nbsp; &nbsp; <span class="kw1">Alias</span> <span class="st0">&#8220;SHGetFolderPathA&#8221;</span> _<br />
&nbsp; &nbsp; (<span class="kw1">ByVal</span> hwndOwner <span class="kw1">As</span> <span class="kw1">Long</span>, _<br />
&nbsp; &nbsp; <span class="kw1">ByVal</span> nFolder <span class="kw1">As</span> <span class="kw1">Long</span>, _<br />
&nbsp; &nbsp; <span class="kw1">ByVal</span> hToken <span class="kw1">As</span> <span class="kw1">Long</span>, _<br />
&nbsp; &nbsp; <span class="kw1">ByVal</span> dwReserved <span class="kw1">As</span> <span class="kw1">Long</span>, _<br />
&nbsp; &nbsp; <span class="kw1">ByVal</span> lpszPath <span class="kw1">As</span> <span class="kw1">String</span>) <span class="kw1">As</span> <span class="kw1">Long</span></p>
<p><span class="kw1">Function</span> MyDocumentsDir()<br />
&nbsp; &nbsp; <span class="kw1">Dim</span> sBuffer <span class="kw1">As</span> <span class="kw1">String</span><br />
&nbsp; &nbsp; sBuffer = Space$(260)<br />
&nbsp; &nbsp; <span class="kw1">If</span> SHGetFolderPath(&amp;amp;H0, &amp;amp;H5, -1, &amp;amp;H0, sBuffer) = 0 <span class="kw1">Then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; MyDocumentsDir = Left$(sBuffer, lstrlenW(StrPtr(sBuffer)))<br />
&nbsp; &nbsp; <span class="kw1">End</span> <span class="kw1">If</span><br />
<span class="kw1">End</span> <span class="kw1">Function</span></div>
</div>
]]></content:encoded>
	</item>
</channel>
</rss>

