Save file in My Documents

Hi,

I would like to know how to save file in my document folder in vb. Since the program working with different user, the my document location must be retrrived from Windows. Please adviced. Thank you.

Kin



Answer this question

Save file in My Documents

  • matthew lyden

    Hi,

    try retrieving the directory through SpecialDirectories object:

    Dim myDocumentsPath = My.Computer.FileSystem.SpecialDirectories.MyDocuments

    Andrej



  • kyle4832

    Dim MyDocs As IO.DirectoryInfo = My.Computer.FileSystem.GetDirectoryInfo(Environment.SpecialFolder.MyDocuments)

    Dim MyDocsPath As String = MyDocs.FullName



  • Save file in My Documents