Function GetSpecialFolderPath(NomeDirectory As Variant) As String
'------------------------------------
' Valori possibili per NomeDirectory:
'------------------------------------
' AllUsersDesktop
' AllUsersStartMenu
' AllUsersPrograms
' AllUsersStartup
' Desktop
' Favorites
' Fonts
' MyDocuments
' NetHood
' PrintHood
' Programs
' Recent
' SendTo
' StartMenu
' Startup
' Templates
'------------------------------------
Dim res As String
Dim oWSHShell As Object
Set oWSHShell = CreateObject("WScript.Shell")
res = oWSHShell.SpecialFolders(NomeDirectory)
Set oWSHShell = Nothing
GetSpecialFolderPath = res
End FunctionVia.
Attenzione: non cambiare il datatype di NomeDirectory"