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
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