Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello ? am new to this site but i think this is the right link to follow ...... am currently working on a school rec mgt system and i wanted to load or run a ms application such as power point through a click of a button in vb.net project and am blank on this field .....can any one kindly assist me on how to do this. thanx in advance.
Posted

If you want to open an application or powerpoint slideshow,You can simply use given code on click event of button
Import System.Diagnostics namespace in your code as
VB
Imports System.Diagnostics

and then write given code on click event of button
VB
Dim myProcess As New Process()
myProcess.StartInfo.FileName = "Location of PowerPoint file"
           myProcess.StartInfo.CreateNoWindow = True
           myProcess.Start()

and
How to run Office macros by using Automation from Visual Basic .NET[^]
 
Share this answer
 
v3
Comments
Tarun.K.S 14-Jul-11 10:15am    
Good answer. 5+
I think setting CreateNoWindow to true is not required.
RaviRanjanKr 14-Jul-11 13:43pm    
Yeah! its not needed actually The default value is False but if user wants start the process without creating a new window to contain it. True is needed there.
RaviRanjanKr 14-Jul-11 13:46pm    
Thanks Tarun For Valuable Vote :)
To open PowerPoint (for eg) import System.Diagnostics
then call Process.Start this will create a new instance of notepad.

VB
Dim p as New Process()
p.StartInfo = new ProcessStartInfo(<path of="" powerpoint="" executable="">,<file to="" open="">;)
p.Start()
</file></path>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900