Unanswered: Application.Filesearch won't find my file!!
Can anyone see what it is I'm doing wrong?! I'm searching for a file to attach to an email, which I KNOW exists in my root (C:\CWA_TOCReport.pdf)
My call statement is
If filefound("C:\CWA_TOCReport.pdf") then.....
here's my function....
Function FileFound(nFileName) As Boolean
.LookIn = Left(nFileName, 3)
.FileName = Right(nFileName, Len(nFileName) - Len(.LookIn))
Debug.Print .LookIn & " " & .FileName
'.MatchTextExactly = True
If .Execute() > 0 Then
'MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
FileFound = True
Debug.Print nFileName & " file not found."
FileFound = False
Nevermind - I found my answer! Turn off indexing!!
Method 1: Disable Indexing Service
1.Click Start, click Run, type Control.exe in the Open box, and then click OK.2.In Control Panel, double-click Administrative Tools, and then double-click Services.3.In the right pane, locate and then click Indexing Service.4.On the Action menu, click Properties.5.On the General tab, click Disabled in the Startup type list, and then click OK to save the changes.6.Close the Services window.