473,376 Members | 1,079 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,376 software developers and data experts.

Open files in associated editors.

Hi All

I have a simple Application and I need to open my documents files in
assoicated applications given the path name and the file name and the
extension.
For example I got all my files stoted in C:\Documents and under that I got
following files.

mydoc.doc
mypdf.pdf
mytxt.txt
myautocad.dwg
and so on..

If I provide the file path in my program it should open up the file with the
relevent assciated application. for example mydoc.doc should open up with
MSWord and myautocad.dwg should open the autocad 2004 installed in my
computer.
How do i do this in my vb.net 2005 framewrok 2.0

Code example would be extreamly helpfull.

Thanks in Advacne
Prash
Nov 6 '06 #1
1 916
Prashwee,

Process start
\\\Word
Dim p As New Process
p.WindowStyle = ProcessWindowStyle.Hidden
p.FileName = "C:\filename.doc"
p.UseShellExecute = True
p.Start
///

I hope this helps,

Cor

"Prashwee" <pr******************@ifs.lkschreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
Hi All

I have a simple Application and I need to open my documents files in
assoicated applications given the path name and the file name and the
extension.
For example I got all my files stoted in C:\Documents and under that I got
following files.

mydoc.doc
mypdf.pdf
mytxt.txt
myautocad.dwg
and so on..

If I provide the file path in my program it should open up the file with
the relevent assciated application. for example mydoc.doc should open up
with MSWord and myautocad.dwg should open the autocad 2004 installed in my
computer.
How do i do this in my vb.net 2005 framewrok 2.0

Code example would be extreamly helpfull.

Thanks in Advacne
Prash


Nov 6 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: serge | last post by:
I am thinking about replacing the INSERT data script files that I have with XML files. This way I can open the XML file using an XML Editor and see the values in a GRID and make changes easier. ...
27
by: Mike | last post by:
Open source programs in general suck pretty bad also. Here are some loose facts regarding why projects like Linux, PHP, MYSQL, and other open source programs suck: - Linux is simply a clone of...
2
by: Sin | last post by:
Hello everyone, I'm totally stumped at how little info I can find in MSDN or on the web concerning this. It's almost as if only microsoft personel hold the key to these secrets or something!!! ...
2
by: Shilpa | last post by:
Hi All, I want to write C# code to identify a file type and open the file in the associated editor. For example, text files should be identified and opened in notepad, html should be opened in...
2
by: OutdoorGuy | last post by:
Greetings, I have a "newbie" question in relation to opening files from C#. I have a Windows form where I allow the user to type in a file extension in a text box (e.g., "xls"). I then take...
2
by: Jeroen | last post by:
The group and search engines revealed many hints on how to use the 'Open With...' dialog, for example at: http://www.codeproject.com/csharp/openwith.asp Now in addition to a solution as...
0
by: Salad | last post by:
A97. Split database. Frontend DB1.MDB. Backend DB1BE.MDB. Tables are linked between DB1 and DB2. From my testing, if I open DB1 exclusively using /excl the backend DB1BE is not opened...
3
by: BASSPU03 | last post by:
Private Sub FilePath_Click() Rem Me! Dim stAppName As String Dim stlink As String stlink = Me! stAppName = "C:\Program Files\Internet Explorer\IEXPLORE.EXE...
1
by: karunakarroyal | last post by:
I want to implement on html editor in our on going project. i am planing to use a open source html editors can any one suggest me any open source html editors which are good in user interactivity....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.