Many thanks, TB. I ticked Windows Script Host in my
Access and modified the example from the MSDN site and it
worked like a dream!. For interest, the code looks like:
"
Sub createShortcut(sourceS As String, linkS As String,
targetS As String, iconS As String)
Dim shell As WshShell, strDesktop As String,
oShellLink As WshShortcut
' create shell
Set shell = New WshShell
' create shortcut and all its properties
Select Case sourceS
Case "DT"
Source = shell.SpecialFolders("Desktop")
Case "AUSM"
Source = shell.SpecialFolders("AllUsersStartMenu")
Case "SM"
Source = shell.SpecialFolders("StartMenu")
End Select
' if special directory was meaningless, go home
If Source <> "" Then
Set oShellLink = shell.createShortcut(Source &
linkS)
oShellLink.TargetPath = targetS
oShellLink.WindowStyle = 3 ' open maximised
'oShellLink.Hotkey = "CTRL+SHIFT+F"
oShellLink.IconLocation = iconS
'oShellLink.Description = "Shortcut Script"
'oShellLink.WorkingDirectory = strDesktop
' save the icon & kill objects
oShellLink.Save
Set oShellLink = Nothing
End If
Set oShell = Nothing
End Sub
"