+ Reply to Thread
Results 1 to 6 of 6

FileSearch fails to find shortcuts!

  1. #1
    Forum Contributor
    Join Date
    09-30-2009
    Location
    Barcelona
    MS-Off Ver
    Excel 2010
    Posts
    274

    Question FileSearch fails to find shortcuts!

    Hello there,

    I want to set a number of hyperlinks in an excel sheet that will point to the files referred by shortcuts that are stored in a certain folder.

    when I manually use filesearch the shortcuts appear, but through vba, no matter what I do filesearch.foundfiles.count is always 0 if only shortcuts are present in the folder (I tried putting a real file and it does find it)

    is there anything that can be done about it?

    If that were possible, I guess that making a hyperlink to a shortcut will also open the file, right?

    that would allow me to avoid a huge number of file duplication...

    please help!

  2. #2
    Forum Contributor
    Join Date
    09-30-2009
    Location
    Barcelona
    MS-Off Ver
    Excel 2010
    Posts
    274

    Re: FileSearch fails to find shortcuts!

    Oh well, I might give up and think some other way around with actual files and not shortcuts!
    Last edited by romperstomper; 07-07-2011 at 03:48 AM. Reason: remove quote

  3. #3
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: FileSearch fails to find shortcuts!

    Since Filesearch won't work from 2007 onwards, I suggest you abandon it now and use Dir or the Scripting.FileSystemObject instead.
    Remember what the dormouse said
    Feed your head

  4. #4
    Forum Contributor
    Join Date
    09-30-2009
    Location
    Barcelona
    MS-Off Ver
    Excel 2010
    Posts
    274

    Thumbs up Re: FileSearch fails to find shortcuts!

    Quote Originally Posted by romperstomper View Post
    Since Filesearch won't work from 2007 onwards, I suggest you abandon it now and use Dir or the Scripting.FileSystemObject instead.
    Wow, didn't know that!
    Thanks a lot, I'll try to switch before it's too late

  5. #5
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: FileSearch fails to find shortcuts!

    A schortcut has a hidden .lnk extension:

    The shortcut to "E:\files.xls" is "E:\files.xls.lnk"



  6. #6
    Forum Contributor
    Join Date
    09-30-2009
    Location
    Barcelona
    MS-Off Ver
    Excel 2010
    Posts
    274

    Re: FileSearch fails to find shortcuts!

    Quote Originally Posted by snb View Post
    A schortcut has a hidden .lnk extension:

    The shortcut to "E:\files.xls" is "E:\files.xls.lnk"
    Do you mention that for the Dir instruction?

    I tried that already in filesearch (even without any filtering at all) and would just tell me that there were 0 files found in that folder....

    We actually changed our working structure so I do not have to link to shortcuts anymore

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1