Re: FileSearch - won't work
The problem is that you need two search routines.
The first you have done and it will work with the modifications below.
You then need to develop the second search routine taht looks inside each of the PPT files.
Your code for teh first search routine should look something like (my changes to your code are underlined)
Dim homeDir, searchPhrase As String
Dim searchCount As Integer
[U][B]Dim lngFileNo As Long[/B][/U]
searchPhrase = Me.txtSearchPhrase.Value
homeDir = "C:\Temp\TestFolder"
.LookIn = homeDir
.SearchSubFolders = False
[U] [B].TextOrProperty = "*" [/B][/U]
.FileType = msoFileTypePowerPointPresentations
If .Execute() > 0 Then
searchCount = .FoundFiles.Count
MsgBox "There were " & searchCount & " file(s) found."
[U] [B] For lngFileNo = 0 to .FoundFiles.Count
Next lngFileNo[/B][/U] Else
The next search routine will need to:
1. Open an application object for PowerPoint.
2. Open the file to be searched
3. Search through the file for the required phrase. To do that I suggest that you open a file in PowerPoint and record a macro that does a search. I have not done it, but I suspect that you can specify the slides to include in the search. You can then copy and paste the code with appropriate edits.
4. Close the file
5. Close PowerPoint
Have a go at this and post back,