View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Brandt Brandt is offline
external usenet poster
 
Posts: 33
Default Find Executable Path with Excel

Peter,

Thank you very much. That looks like exactly what I am looking for.

Brandt

"Peter T" wrote:

This example from Randy Birch should do it
http://vbnet.mvps.org/index.html?cod...executable.htm

in the example change -
success = FindExecutable("winhlp32.hlp", "c:\winnt\system32\", sResult)

to -

Dim sFile$ ' place up top
sFile = "c:\my documents\myDoc.doc"
success = FindExecutable(sFile, "", sResult)

Regards,
Peter T


"Brandt" wrote in message
...
Hello All!

Does anyone know of a way to find the path to the executable that opens a
particular file, such that if I give the path to a file (or just the file
type extension) it will return the path to the executable that opens that
file. For example if I give the path to "C:\Documents and
Settings\brandt\Desktop\mywordfile.doc" it will return the path to

winword.exe

Thanks in advance for your help

Brandt