Calling MS OFFICE programs !

lailas

New member
Joined
Sep 27, 2006
Messages
4
Programming Experience
Beginner
hiii all
i am very new to VB...just started
i am trying to set menue of MS OFFICE programs(word,excel ,ms project..) in a VB.NET application
the field in the menue will be enabled only when those programs r available
Then we can call the needed program to open in vb.net application,
but we need also tjo control the location of the programs
i mean when calling the word program , it should located below the application ,,!
but HOW !:D
I NEED UR HELP PLZ
 
Office is always installed to the "C:\Program Files\Microsoft Office" directory from there you've got the different versions of office, office 2003 is the office11 folder and viso 2003 is the viso11 folder

inside those folders are the different exe files that launch the actual office app so to use that in your program simply use the Process class and the Process.Start() method

VB.NET:
'Word
Dim prcWord As System.Diagnostics.Process = System.Diagnostics.Process.Start("C:\Program Files\Microsoft Office\OFFICE11\winword.exe")

'Excel
Dim prcExcel As System.Diagnostics.Process = System.Diagnostics.Process.Start("C:\Program Files\Microsoft Office\OFFICE11\excel.exe")
 
Back
Top