I
IztokZ
Part of my Word macro is using for counting files in a folder. The problem is
that result of counting also includes all open files in that folder. So the
number of files is correct only if no documents are open in that folder.
This worked well in Office 2000 (Word 2000). Result didn't include open files.
The macro is the same and it doesn't work correctly in Office 2003 (Word
2003).
The code:
Dim stevec As Integer
With Application.FileSearch
.FileName = "pr????.doc"
.LookIn = "\\_server_\_folder_\"
.SearchSubFolders = False
.Execute
For stevec = 1 To .FoundFiles.Count
Next
End With
MsgBox Stevec
Regards, Iztok
that result of counting also includes all open files in that folder. So the
number of files is correct only if no documents are open in that folder.
This worked well in Office 2000 (Word 2000). Result didn't include open files.
The macro is the same and it doesn't work correctly in Office 2003 (Word
2003).
The code:
Dim stevec As Integer
With Application.FileSearch
.FileName = "pr????.doc"
.LookIn = "\\_server_\_folder_\"
.SearchSubFolders = False
.Execute
For stevec = 1 To .FoundFiles.Count
Next
End With
MsgBox Stevec
Regards, Iztok