P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Dec 18th, 2003 01:33 PM Post subject: Get Target Path Of Shortcut |
|
|
Similar code like creating a shortcut
[vb:1:a3bcb11280]
Option Explicit
Private Sub Command1_Click()
MsgBox GetTargetPath("ShortCut Filename")
End Sub
Function GetTargetPath(ByVal FileName As String)
Dim Obj As Object
Set Obj = CreateObject("WScript.Shell")
Dim Shortcut As Object
Set Shortcut = Obj.CreateShortcut(FileName)
GetTargetPath = Shortcut.TargetPath
Shortcut.Save
End Function[/vb:1:a3bcb11280] _________________ No one is completely useless. They can at least be an example of what to avoid. |
|