Try %userprofile%\Desktop as destination folder.
mfG
--> stefan <--
> hi Trever,
>
>> I know how to copy from a specific location but how does one copy to
>> desktop?
> Try %userprofile%\Desktop as destination folder.
That didn't work for me as is, but this did:
strFrom = "C:\Temp\Test.txt"
strTo = Environ("userprofile") & "\Desktop\Test.txt"
FileCopy strFrom, strTo
Granted, the environment string may not be present in all versions of
Windows, and could be doctored externally. One could also take the more
complicated approach of calling the Windows API to get the desktop
folder, using the code posted here:
http://www.mvps.org/access/api/api0054.htm
API: Retrieving a Special Folder's location

Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
Bob Bonta - 06 Mar 2007 21:08 GMT
Hey guys!
Try using this folder location in the destination variable:
"C:\Documents and Settings\All Users\Desktop\"
This will even preclude the security issue of writing to the desktop of
another user who might not possess the appropriate permissions. All users
can write/modify the contents of the 'All Users' profile.

Signature
~ Bob Bonta ~
> > hi Trever,
> >
[quoted text clipped - 15 lines]
> http://www.mvps.org/access/api/api0054.htm
> API: Retrieving a Special Folder's location