LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Path to desktop

Robert Crandal wrote:
"Auric__" wrote :

While you usually *can* find it using the already-suggested USERPROFILE
environment variable, or the FileSystemObject, the method I've found
to be
"best" (most reliable, whatever) is the SHGetSpecialFolderPath API call:

........
(I use this because I usually change the location of the desktop to a
certain
directory on my server. Good luck getting something in
C:\users\Auric\Desktop
to show up on my desktop.)


First, thank you everyone who replied. All info was helpful.....

And, BTW Auric, each user is assigned a directory on the server.
I believe that each user has a Desktop either on the C: drive or
a server directory named \\fserver1 or something similar. I don't
remember exactly, but I will have to check.

I will give this SHGetSpecialFolderPath() API next time I go to work.
Seems odd that USERPROFILE and FileSystemObject and
SHGetSpecialFolderPath() would return different results, but I shall
put this to the test.

Thanks again.



I tested SHGetSpecialFolderPath and it worked great pointing to right
folder. I have desktops redirected to another disk separately from
userprofile and it returned correct folder.


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Desktop path? Charlotte E.[_2_] Excel Programming 4 September 2nd 08 05:16 AM
Remove end folder from path found with ThisWorkbook.Path command ? dim Excel Programming 9 April 23rd 08 06:04 AM
EXCEL FILES SAVED TO DESKTOP WILL NOT OPEN FROM DESKTOP randy111 Excel Discussion (Misc queries) 3 January 13th 08 10:38 PM
How to path to user's desktop 1scant[_8_] Excel Programming 2 June 16th 06 03:52 PM
hyperlink navigation path path wrong in Excel 2003 CE Admin Excel Discussion (Misc queries) 5 January 7th 06 07:47 PM


All times are GMT +1. The time now is 10:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"