Launching applications based on extension

  • Thread starter Thread starter Mark Hollander
  • Start date Start date
M

Mark Hollander

Hi All,

I am trying to launch an application based on the extension just like
windows explorer does, specifically with regards to templates.

For example,
1. When you double click on a word template, it loads word with a new
document based on the template you clicked on. Extension: dot

2. When you double click on a excel template, it loads a new spread sheet
based on the template you clicked on. Extension XLT

3. When you double click on a visio template, it loads a new visio document
based on the template you clicked on. Extension VST


and so on,

When I checked on the extension types in Windows explorer I noticed that
they where using a DDE message to achieve this with the keyword new.

Does anyone have a coding example that will do the same thing
 
Hi All,

I am trying to launch an application based on the extension just like
windows explorer does, specifically with regards to templates.

For example,
1. When you double click on a word template, it loads word with a new
document based on the template you clicked on. Extension: dot
2. When you double click on a excel template, it loads a new spread sheet
based on the template you clicked on. Extension XLT

3. When you double click on a visio template, it loads a new visio document
based on the template you clicked on. Extension VST

and so on,

When I checked on the extension types in Windows explorer I noticed that
they where using a DDE message to achieve this with the keyword new.

Does anyone have a coding example that will do the same thing

Hi,
If you have Office installed, i mean, if file types are associated
previously, based on my understanding, you are not looking for
anything other than simply launching the file using:

System.Diagnostics.Process.Start("c:\excel_template.xls")
....or any other file.

Like in the example above, behind the scenes, when you double-click on
"excel_template.xls" file in Windows Exploer, the filename is passed
as argument to Excel.exe and Excel is launched by getting that
filename argument.

Hope this helps,

Onur Güzel
 
Back
Top