View Single Post
 
Old 08-19-2010, 02:18 PM
cksm4 cksm4 is offline Windows XP Office 2007
Advanced Beginner
 
Join Date: Aug 2010
Posts: 48
cksm4 is on a distinguished road
Default Application.FileSearch

A little new to Word so any help would be greatly appreciated. I believe that I need to replace Application.FileSearch with FileSystemObject to make my macro work in 2007. Below is the code causing the issue:

With Application.FileSearch
.NewSearch
.LookIn = MainPath
.SearchSubFolders = False
.FileName = DataName
.FileType = msoFileTypeAllFiles
If Not .Execute() > 0 Then 'if data file is not found
GoTo NoDataFile 'branches to label at the end of this procedure to open _
the Main Dialog box
End If
End With

Any ideas
Reply With Quote