'reference to Windows Script Host Object Model is required
'this version goes to a folder of your choice
Dim
wShell
As
New
IWshShell_Class
Dim
wShortcut
As
IWshShortcut_Class
Set
wShortcut
=
wShell.CreateShortcut(
"d:\test.lnk"
)
wShortcut.TargetPath
=
"d:\test.txt"
wShortcut.Save
'and this version goes to the desktop
Dim
wShell
As
New
IWshShell_Class
Dim
wShortcut
As
IWshShortcut_Class
Dim
sDesktop
As
String
' path of desktop
Dim
sTargetPath
As
String
' path to file for which a link is to be created