>I have an app that has this bit of code in it:
>
>myfolder = 'C:\USERS\' + ALLTRIM(cUserID) + '\DESKTOP\DRS Excel Files\'
>
>My problem is that now some of the users are on Citrix and using onedrive, so this location is no longer valid. Isn't there a SYS() function or something I can run to get the logged in users' desktop folder location???
>
>Thanks everyone.
We are using this code:
DECLARE LONG SHGetSpecialFolderLocation IN shell32 LONG HWND, LONG nFolder, ;
LONG @ ppidl
lcPath = SPACE(200)
lnPidl = 0
lnPidlFound = SHGetSpecialFolderLocation(0, 0, @lnPidl)
DECLARE LONG SHGetPathFromIDList IN shell32 LONG Pidl, STRING @ pszPath
lnFolderFound = SHGetPathFromIDList(lnPidl, @lcPath)
lcPath = LEFT(m.lcPath, AT(CHR(0), m.lcPath) - 1)
MESSAGEBOX(lcPath)
Christian Isberner
Software Consultant