FileSearch - won't work

  • I have a simple form with a TextBox and a CommandButton.
    I need to search the contents of all PPT files in a specific folder for the presence of whatever word is entered in the TextBox.
    If the word exists within the first 4 slides of the PPT file(s) in question, the results are correct.
    If the word exists in slides 5 through END, the results are wrong.

  • 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)

    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,

    Good luck,


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!