Full Pathname on Shortcut Files - Word 2003 vs Word 2000

H

Herman7

Hi Everybody
Re: Word 2003 Vs Word 2000 & 97 VBA on Shortcut Filenames


I am encountering the following problem with Word 2003

When FoundFiles is executed in a folder containing shortcuts to word
documents, it returns the Full Pathnames of the shortcut files ( what I need
is the Target File full pathnames) however if the same code is executed in
the same folder in Word 2000 or Word 97 it is returning the full pathnames
of the Target Files which is the desired result. Has anybody got any idea as
to how I could resolve the problem in Word 2003.
Thanks

Herman

The Test code is given below

Sub Test2()
Dim i As Long
Dim NumberOfFiles As Long
ProjectDirectory = InputBox("What is the Project Directory? Add \ at End")
MsgBox (ProjectDirectory)
With Application.FileSearch
.LookIn = ProjectDirectory
.FileType = msoFileTypeAllFiles 'needed for Word2003
.Execute (msoSortByFileName)
NumberOfFiles = .FoundFiles.Count
Debug.Print NumberOfFiles
For i = 1 To .FoundFiles.Count
Debug.Print .FoundFiles(i)
Next i

End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top