Ah, I used those two examples just to keep things simple. In reality, I intend to have an edit box with an instruction to the user "Enter file extension to search for, seperated with a comma", so the user could ask for all sorts of file types (and ones I don't even know about), but not necessarily all files and not necessarily just these two doc and pdf files as exampled. So my edit1.Text could possibly be
*.pdf, *.xls, *.xlsx, *.doc, *.msg
I will then need to pass that comma seperated string to FindAllFiles