You could check the extension, using Left$.
It would not be 100% safe, as the user could use a different extension, but in most cases it would work fine.
I use a simple class I wrote a while back to parse file names, I posted it on my blog for you to look at: http://planetlotus.org/a89774
The formatting of the code get ruined here in this forum, so I prefer to post code on my blog.
Attach only .pdf doc LS (Gabrielle R Cou... 19.Dec.12)
Feedback response number WEBB936PQ8 created by Karl-Henry Martinsson on 12/20/2012
. . Onchange event (Karl-Henry Mart... 19.Dec.12)
. . . . DialogBox but.. (Gabrielle R Cou... 19.Dec.12)
. . . . . . Left$ perhaps? (Karl-Henry Mart... 20.Dec.12)
. . . . . . . . Thanks you (Gabrielle R Cou... 20.Dec.12)
. . . . . . . . . . Expanded class (Karl-Henry Mart... 21.Dec.12)