Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sharing violation on Excel files and cannot find the path specifie Will Excel Discussion (Misc queries) 0 December 7th 09 01:21 PM
find full file path of running excel instance Rama Excel Programming 8 February 12th 07 03:15 PM
How to find out the path to excel.exe thru vb [email protected] Excel Programming 1 March 19th 06 09:24 PM
find and replace path name in Excel cells containing hyperlink leoe Excel Discussion (Misc queries) 1 August 9th 05 08:57 PM
Find Excel path Lieven Mettepenningen[_2_] Excel Programming 5 December 14th 04 01:22 AM


All times are GMT +1. The time now is 05:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"