![]() |
Find Executable Path with Excel
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 |
Find Executable Path with Excel
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 |
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 |
All times are GMT +1. The time now is 05:12 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com