|
|

Getting the target that is executed by a shortcut
If you want to find the target that is executed by a shortcut, either on the desktop, or from the Program files menu, then the easiest way is to use the Windows Scripting Host library to do this:
Public Function fGetShortcutTarget(strShortcut As String) As String
On Error GoTo E_Handle
Dim objShell As Object, objLink As Object
Set objShell = CreateObject("WScript.Shell")
Set objLink = objShell.CreateShortcut(strShortcut)
fGetShortcutTarget = objLink.TargetPath
fExit:
On Error Resume Next
Set objLink = Nothing
Set objShell = Nothing
Exit Function
E_Handle:
MsgBox Err.Description & vbCrLf & "fGetShortcutTarget", vbOKOnly + vbCritical, "Error: " & Err.Number
Resume fExit
End Function
|
Top
HOME |
NEW |
TABLES |
QUERIES |
FORMS |
REPORTS |
GENERAL |
API |
DOWNLOADS |
TUTORIAL |
RESOURCES
E-MAIL
Copyright & Disclaimer
|
| |