Simple Q. for the reasonably experienced - 2 
Author Message
 Simple Q. for the reasonably experienced - 2

Does anyone know how (in code) to check if a file extension name is
associated with an application, and if so retrieve the relevant EXE file so
that I can then use the shell command with it.

For example my computer knows that when (in Windows Explorer) I double click
a file that has an XLS extension name it should use Excel to open it.



Thu, 09 Nov 2000 03:00:00 GMT  
 Simple Q. for the reasonably experienced - 2

Quote:

>Does anyone know how (in code) to check if a file extension name is
>associated with an application, and if so retrieve the relevant EXE file so
>that I can then use the shell command with it.

See http://home.earthlink.net/~butlerbob/vb/tasks/shellany.htm


Thu, 09 Nov 2000 03:00:00 GMT  
 Simple Q. for the reasonably experienced - 2

Yes... But check this:

Shell("spreadsheet.xls")

will open Excel with the spreadsheet.xls file

--
Christian...

--

Quote:

>Does anyone know how (in code) to check if a file extension name is
>associated with an application, and if so retrieve the relevant EXE file so
>that I can then use the shell command with it.

>For example my computer knows that when (in Windows Explorer) I double
click
>a file that has an XLS extension name it should use Excel to open it.



Thu, 09 Nov 2000 03:00:00 GMT  
 Simple Q. for the reasonably experienced - 2

Christian,

Are you sure? This doesn't work on any machine I develop on.

Matthew



Quote:
> Yes... But check this:

> Shell("spreadsheet.xls")

> will open Excel with the spreadsheet.xls file

> --
> Christian...




Thu, 09 Nov 2000 03:00:00 GMT  
 Simple Q. for the reasonably experienced - 2

It works for me... Maybe I used some sort of API shell command ?

--
Christian...

--

Quote:

>Christian,

>Are you sure? This doesn't work on any machine I develop on.

>Matthew



>> Yes... But check this:

>> Shell("spreadsheet.xls")

>> will open Excel with the spreadsheet.xls file

>> --
>> Christian...




Fri, 10 Nov 2000 03:00:00 GMT  
 Simple Q. for the reasonably experienced - 2

Quote:

>It works for me... Maybe I used some sort of API shell command ?

>>Are you sure? This doesn't work on any machine I develop on.


>>> Yes... But check this:
>>> Shell("spreadsheet.xls")
>>> will open Excel with the spreadsheet.xls file

What OS and version are you using?  Do you have any user-defined Shell
function that wraps some other method like ShellExecute?  The Shell command
itself does not do this in any version of VB or under any OS that I have
ever seen either.


Fri, 10 Nov 2000 03:00:00 GMT  
 Simple Q. for the reasonably experienced - 2

Christian,

Quote:
> It works for me... Maybe I used some sort of API shell command ?

What - you didn't test it? If someone questions whether something works, it
may be more useful for you to actually check rather than say the above.
Your answer has been sprinkled through this and numerous other threads, and
it is simply INCORRECT. Shell doesn't work like that, and that is why
everyone uses ShellExecute.

Matthew



Quote:
> It works for me... Maybe I used some sort of API shell command ?

> --
> Christian...

> --


> >Christian,

> >Are you sure? This doesn't work on any machine I develop on.

> >Matthew



> >> Yes... But check this:

> >> Shell("spreadsheet.xls")

> >> will open Excel with the spreadsheet.xls file

> >> --
> >> Christian...




Fri, 10 Nov 2000 03:00:00 GMT  
 Simple Q. for the reasonably experienced - 2

Eggsactly... I knew that it was the ShellExecute command but I don't use it
as much as I used to.

--
Christian...

--

Quote:

>Christian,

>> It works for me... Maybe I used some sort of API shell command ?

>What - you didn't test it? If someone questions whether something works, it
>may be more useful for you to actually check rather than say the above.
>Your answer has been sprinkled through this and numerous other threads, and
>it is simply INCORRECT. Shell doesn't work like that, and that is why
>everyone uses ShellExecute.

>Matthew



>> It works for me... Maybe I used some sort of API shell command ?

>> --
>> Christian...

>> --


>> >Christian,

>> >Are you sure? This doesn't work on any machine I develop on.

>> >Matthew



>> >> Yes... But check this:

>> >> Shell("spreadsheet.xls")

>> >> will open Excel with the spreadsheet.xls file

>> >> --
>> >> Christian...




Sat, 11 Nov 2000 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Simple Q. for the reasonably experienced

2. 2 fairly simple database Qs

3. Simple FileSystemObject Q.

4. A Simple Request For The Experienced

5. Help please with a simple problem I am sure for an experienced programmer

6. Simple question for the more experienced programmer??

7. Simple question for the experienced!

8. Simple question for the experienced!

9. Please Help--Probably simple to the experienced.

10. PDS7 PROGRAMMER WANTED-Multi-user experience-Network Experience

11. Q. Simple Question-How can I reuse Forms in VB?

12. Simple Q. How do you create a 16-bit .OCX?

 

 
Powered by phpBB® Forum Software