Sending a shortcut to the desktop

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top