/ Published in: Visual Basic
I didn't write this, but I also don't remember where I got it.
Expand |
Embed | Plain Text
Private Declare Function SHGetSpecialFolderPathW Lib "shell32.dll" ( _ ByVal hwndOwner As Long, _ ByVal lpszPath As Long, _ ByVal nFolder As Long, _ ByVal fCreate As Long) As Boolean Private Const MD As Long = &H5 Public Function My_Documents() As String Dim Folders(512) As Byte My_Documents = vbNullString If SHGetSpecialFolderPathW(0&, _ ByVal VarPtr(Folders(0)), _ MD, 0&) Then My_Documents = Left$(Folders, InStr(Folders, Chr$(0)) - 1) End If Erase Folders End Function
You need to login to post a comment.
