试试Function GetTargetPath(ByVal LinkName As String) On Local Error Resume Next Dim Obj As Object Set Obj = CreateObject("WScript.Shell") Dim Shortcut As Object Set Shortcut = Obj.CreateShortcut(LinkName) GetTargetPath = Shortcut.TargetPath Shortcut.SaveEnd Function
On Local Error Resume Next
Dim Obj As Object
Set Obj = CreateObject("WScript.Shell") Dim Shortcut As Object
Set Shortcut = Obj.CreateShortcut(LinkName)
GetTargetPath = Shortcut.TargetPath
Shortcut.SaveEnd Function