V
Vince Marconi
I'm having problems finding files other than .ppt using the
Application.filesearch.execute method. FileName has the correct path of the
file and extension, but when it gets to .Execute, it only displays the
powerpoint files. The powerpoint doesn't even have to match the filename to
be found in the Execute method.
I've converted this Access 97 database to Access 2002. The Execute method
works fine in 97, but it breaks when I use it in Access 2002. Any ideas or
comments would be appreciated!
Here's my code:
With Application.filesearch GCN = Forms!Main_Menu!hidden_gcn
..NewSearch
If Left(GCN, 1) = "A" Then
subdir = Left(GCN, 3)
.LookIn = "C:\TEMP\" & subdir
.FileName = GCN & ".cgm"
.SearchSubFolders = True
Lowercase = LCase(.FileName)
.MatchAllWordForms = True
.............
If .Execute() > 0 Then
i = .FoundFiles
.Count foundfile = .FoundFiles(i)
MyString = "C:\Program Files\Office2K\Office\Photodrw.exe " & foundfile
ShellString = Shell(MyString, 3)
Else
MsgBox "There were no files found."
End If
Application.filesearch.execute method. FileName has the correct path of the
file and extension, but when it gets to .Execute, it only displays the
powerpoint files. The powerpoint doesn't even have to match the filename to
be found in the Execute method.
I've converted this Access 97 database to Access 2002. The Execute method
works fine in 97, but it breaks when I use it in Access 2002. Any ideas or
comments would be appreciated!
Here's my code:
With Application.filesearch GCN = Forms!Main_Menu!hidden_gcn
..NewSearch
If Left(GCN, 1) = "A" Then
subdir = Left(GCN, 3)
.LookIn = "C:\TEMP\" & subdir
.FileName = GCN & ".cgm"
.SearchSubFolders = True
Lowercase = LCase(.FileName)
.MatchAllWordForms = True
.............
If .Execute() > 0 Then
i = .FoundFiles
.Count foundfile = .FoundFiles(i)
MyString = "C:\Program Files\Office2K\Office\Photodrw.exe " & foundfile
ShellString = Shell(MyString, 3)
Else
MsgBox "There were no files found."
End If