Auto-create desktop shortcut and favorite

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

I have a http link than I want to add to IE's favorites and create a desktop
shortcut for access when user opens my database. Is there a way to do that?
Thanks for any help.
 
Thanks a lot for the help.

MDW said:
I don't know about how to add the favorite, but this code to create a desktop
shortcut worked OK in A97. I haven't used it in other versions, but it should
get yout on your way:

Const strSource = "C:\Whatever\Path\You\Need\"
set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
set oShellLink = WshShell.CreateShortcut(strDesktop & "\ShortCut Text.lnk")
oShellLink.TargetPath = strSource
oShellLink.WindowStyle = 1
oShellLink.Hotkey = "CTRL+SHIFT+A" ' Optional
oShellLink.IconLocation = "C:\Program Files\Microsoft
Office\Office\MSACCESS.EXE, 0"
oShellLink.Description = "Description Goes Here"
oShellLink.WorkingDirectory = strDesktop
oShellLink.Save

Set oShellLink = Nothing
Set WshShell = Nothing
 
Back
Top