B
Bart VB
A macro which had to retrieve .lst-files from a directory
used to work under WIN98 but doesn't work anymore under
WIN2000 (first part of the macro is shown below).
I'm working with word2000.
Following error message appears for the line '.FileName
= "*.lst"' : invalid procedure call or argument.
How can this be resolved?
Many thanks for your help.
Bart
Set fs = Application.FileSearch
With fs
.LookIn = CurDir
.FileName = "*.lst"
If .Execute(SortBy:=msoSortByFileName, _
SortOrder:=msoSortOrderAscending) > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" lst file(s) found."
For I = 1 To .FoundFiles.Count
Documents.Open FileName:=.FoundFiles(I)
..
used to work under WIN98 but doesn't work anymore under
WIN2000 (first part of the macro is shown below).
I'm working with word2000.
Following error message appears for the line '.FileName
= "*.lst"' : invalid procedure call or argument.
How can this be resolved?
Many thanks for your help.
Bart
Set fs = Application.FileSearch
With fs
.LookIn = CurDir
.FileName = "*.lst"
If .Execute(SortBy:=msoSortByFileName, _
SortOrder:=msoSortOrderAscending) > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" lst file(s) found."
For I = 1 To .FoundFiles.Count
Documents.Open FileName:=.FoundFiles(I)
..