Romolo said:
I'm trying to set up a simple task to install my EXCEL files into my
friends'
sys. To do that, I basically need to create sortcuts into Desktop window.
Can
I achieve that by using Visual Basic? Any reference?
Thanks in advance!
The fastest way consists of you creating the shortcut
manually, then copying the .lnk file to your friend's PC.
A more time consuming method requires some code,
e.g. like so::
'Set ObjShell = CreateObject("WScript.Shell")
'strPath=ObjShell.SpecialFolders("Desktop")
'Set objShortcut =ObjShell.CreateShortcut(strPath & "\Explorer Test.lnk")
'
'objShortcut.TargetPath = "%systemroot%\explorer.exe"
'objShortcut.arguments="D:\"
'objShortcut.Description = "Explorer Test"
'objShortcut.HotKey = "Ctrl+Shift+N"
'objShortcut.Save
This is fully explained under the "CreateShortcut" method in
the help file "script56.chm", which you can download from
the Microsoft site.