Question File path to current users documents folder

Reyn

Member
Joined
Dec 11, 2008
Messages
14
Programming Experience
1-3
In VB how do you target the current users documents folder? I.e. C:\Users\Current User\Documents in Vista, or C:\Documents and Settings\Current User\My Documents in XP. I know how to retrieve the users name.

The only thing I can think of is to code for detecting the os and the direct the file path using that and the user name, but im guessing there is an easier way.
 
My.Computer.FileSystem.SpecialDirectories.MyDocuments or Environment.GetFolderPath returns this string.
 
Back
Top