C
Chris Green
I'm trying to create shortcuts using WSH. When it sets the target, I get an
"Invalid Procedure Call" error. This happens whether or not the target is
hard-coded and with both early and late binding. I know it's creating the
shortcut object because it's showing up in the watches. Here's a sample.
Dim wshShell As Object
Dim wshShortcut As Object
Set wshShell = CreateObject("WScript.Shell")
Set wshShortcut = wshShell.CreateShortcut("C:\Temp\Short.lnk")
With wshShortcut
.TargetPath = "Test.doc"
.Save
End With
Thanks,
Chris
"Invalid Procedure Call" error. This happens whether or not the target is
hard-coded and with both early and late binding. I know it's creating the
shortcut object because it's showing up in the watches. Here's a sample.
Dim wshShell As Object
Dim wshShortcut As Object
Set wshShell = CreateObject("WScript.Shell")
Set wshShortcut = wshShell.CreateShortcut("C:\Temp\Short.lnk")
With wshShortcut
.TargetPath = "Test.doc"
.Save
End With
Thanks,
Chris