Sending a shortcut to the desktop

P

Paul

Hi,
To send a shortcut for an excel workbook to my desktop I currently have to
open Explorer, find the file and send it to the desktop.
Is there an easier way in Excel itself?

Thanks for looking

Paul
 
J

Jim Rech

You'd need a macro like this:

Sub MakeDesktopShortcut()
Dim wsh As Object
Dim SC As Object
Dim DesktopPath As String
Set wsh = CreateObject("WScript.Shell")
DesktopPath = wsh.SpecialFolders.Item("Desktop")
Set SC = wsh.CreateShortcut(DesktopPath & "\test.lnk")
SC.TargetPath = "C:\book1.xls"
SC.Save
Set wsh = Nothing
End Sub
 
Top