Re: Locating "My Documents" folder by Michel
Michel
Tue May 10 03:46:25 CDT 2005
Allan,
#Define CSIDL_PERSONAL 5 &&Personal Documents Folder
Local lCSpecialFolderPath
lCSpecialFolderPath = space(255)
*** Declare API's
Declare SHGetSpecialFolderPath IN SHELL32.DLL ;
LONG hwndOwner, ;
STRING @lcSpecialFolderPath, ;
LONG nWhichFolder
*** Get Special Folder Path
SHGetSpecialFolderPath(0, @lCSpecialFolderPath, CSIDL_PERSONAL)
*** Format Special Folder Path
lCSpecialFolderPath=SubStr(RTrim(lCSpecialFolderPath),1, ;
Len(RTrim(lCSpecialFolderPath))-1)
lCspecialFolderPath is "My Documents" folder...
"Allan" <Allan@discussions.microsoft.com> a écrit dans le message de news:
3D72CA16-3A2A-4E80-980D-B5B48912DF84@microsoft.com...
> Hi to all,
>
> I'm trying to locate the current "My Documents" folder programmatically to
> point the default directory when I call PUTFILE() function. How can I do
> this? I've tried GETENV() but it doesn't give me the "My Documents"
> folder...
>
> Any help would be much appreciated... Thanks.
>
> Allan