Maybe this will help you collect a copy of the orginal files, based on the shortcut information, into the folder of short cuts.
Then you can select all .xls files and zip. Once you have a zip you can delete the copied .xls files
Sub X()
' requires reference to Windoes Scripting Host object model
Dim objWSH As WshShell
Dim wshShortcut As wshShortcut
Dim strFile As String
Dim strPath As String
Dim strName As String
Set objWSH = New WshShell
strPath = "C:\temp\MyShortcuts\"
strFile = Dir(strPath & "*.lnk")
Do While Len(strFile) > 0
Set wshShortcut = objWSH.CreateShortcut(strPath & strFile)
strName = strPath & Mid(wshShortcut.TargetPath, InStrRev(wshShortcut.TargetPath, "\") + 1)
Debug.Print wshShortcut.TargetPath, strName
'' FileCopy wshShortcut.TargetPath, strName
strFile = Dir
Loop
Set objWSH = Nothing
End Sub
So I have a folder in C:\temp called MyShortcuts. This folder contains shortcuts to xls files in other locations.
The code currently only displays information in the immediate window about which files and where they are stored.
Bookmarks