Application.TemplatesPath 'Returns the local path where templates are stored. Read-only String.
Application.DefaultFilePath 'the path you are looking for, i presume
'Returns or sets the default path that Microsoft Excel uses when it opens files.
Application.LibraryPath 'Returns the path to the Library folder, but without the final separator.
Application.StartupPath 'Returns the complete path of the startup folder, excluding the final separator.
Application.UserLibraryPath 'Returns the path to the location on the user’s computer where the COM add-ins are installed.
or API:
'*****************
GetDefaultUserProfileDirectory
Declare Function GetDefaultUserProfileDirectory Lib "userenv.dll" Alias "GetDefaultUserProfileDirectoryA" (ByVal lpProfileDir As String, lpcchSize As Long) As Boolean
sub dd()
Dim sBuffer As String
sBuffer = String(255, 0)
'retrieve the user profile directory
GetDefaultUserProfileDirectory
sBuffer, 255
end sub
'*****************
Private Declare Function GetAllUsersProfileDirectory Lib "userenv.dll" Alias "GetAllUsersProfileDirectoryA" (ByVal lpProfileDir As String, lpcchSize As Long) As Boolean
sub dd2()
Dim sBuffer As String
sBuffer = String(255, 0)
'retrieve the all users profile directory
GetAllUsersProfileDirectory sBuffer, 255
'show the result
Me.Print StripTerminator(sBuffer)
end sub
'strips off the trailing Chr$(0)'s
Function StripTerminator(sInput As String) As String
Dim ZeroPos As Long
ZeroPos = InStr(1, sInput, Chr$(0))
If ZeroPos > 0 Then
StripTerminator = Left$(sInput, ZeroPos - 1)
Else
StripTerminator = sInput
End If
End Function
'*****************
...i tak dalse

ide