>>>>Hi,
>>>>
>>>>In the PUTFILE() dialog I want the user to see both XLS and XLSX files. The only way I could do it if I pass the following in the Extention parameter: "XLS*" (using asterisk wild card).
>>>>
>>>>But I read in VFP help that I should be able to specify two extensions as "XLS, XLSX" or "XLS| XLSX" or "XLS; XLSX" but none of these methods work.
>>>>
>>>>What am I missing?
>>>
>>>It looks like either a bug or misleading text in Help. Anyway, this works:
>>>
>>>
?Putfile('some text','','xls*')
>>
>>This is what I said works (see above). But how come when putting the extensions one after the other it does not work? This is what I am trying to figure out.
>
>Both of these work:
>
>?putfile("aa","", "abc;def")
>?putfile("aa","", "abc|def")
>
>But I don't see that there's a way to add a description unless it's one of registered types - for that you'd have to use common dialog object. But since both xls and xlsx are registered type, Putfile('some text','','xls;xlsx') should work and display the type description in the lower combo. Doesn't do that in my case because I don't have the Office installed on my fox box.
That was not my question. I was simply looking for the Putfile() dialog to show all files (on the current drive and folder) of the specified extensions. For example, if you have putfile("aa","", "abc;def"), the dialog (where you would enter or select a file) would show all files that have extension "abc" and "def". The only way I was able to do it (again, to make all files appear in the dialog) was by using the wild card asterisk (putfile("aa","", "xls*"). But what I found is when specifying the wild card and then entering any name (e.g. Test1), I was getting error message "Wrong File Name". Therefore, I ended up using the approach of putting both extensions and separating them with the vertical line. So the customer can choose which files he/she wants to see (either XLS or XLSX). Type description was not in the consideration.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham