| | |
Run ppt with C#- urgent !!!!
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2006
Posts: 116
Reputation:
Solved Threads: 0
I am creating a folder watcher application.
If a new powerpoint file gets added in the folder it should get started automatically.
So if I put .pps file into the folder then and I say
it works fine.
This is not the case with .ppt files
Only the powerpoint application gets started not the slideshow.I want the slideshow to be started.
I have done some R & D and found that Microsoft.Office.Interop.PowerPoint will help and done something like this
But this is also doing the application open not the slideshow, does anybody have any idea?
Also I want rest all powerpoint presentations gets closed and only currently added powerpoint application gets started as slideshow.
Thanks in advance,
If a new powerpoint file gets added in the folder it should get started automatically.
So if I put .pps file into the folder then and I say
C# Syntax (Toggle Plain Text)
System.Diagnostics.Process.Start(fullPath);
it works fine.
This is not the case with .ppt files
Only the powerpoint application gets started not the slideshow.I want the slideshow to be started.
I have done some R & D and found that Microsoft.Office.Interop.PowerPoint will help and done something like this
C# Syntax (Toggle Plain Text)
Microsoft.Office.Interop.PowerPoint.Application ppApp = new Microsoft.Office.Interop.PowerPoint.Application(); ppApp.Visible = MsoTriState.msoTrue; Microsoft.Office.Interop.PowerPoint.Presentations oPresSet = ppApp.Presentations; Microsoft.Office.Interop.PowerPoint._Presentation oPres = oPresSet.Open(e.FullPath, MsoTriState.msoFalse, MsoTriState.msoFalse, MsoTriState.msoTrue);
Also I want rest all powerpoint presentations gets closed and only currently added powerpoint application gets started as slideshow.
Thanks in advance,
Last edited by bhavna_816; Dec 11th, 2008 at 2:09 am.
•
•
Join Date: Aug 2008
Posts: 1,735
Reputation:
Solved Threads: 186
Then you need to check the extension and specifically not just launch the ppt file as its put in the folder, but launch the slide show.
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
•
•
Join Date: Sep 2006
Posts: 116
Reputation:
Solved Threads: 0
Thanks friends for your valuable replies. The main problem is solved of launching the slideshow of .ppt files.. with the help of this code
Now I want to close all the running powerpoint files and only want to run the current one only...
Does any body have any idea?
C# Syntax (Toggle Plain Text)
Microsoft.Office.Interop.PowerPoint.Application ppApp = new Microsoft.Office.Interop.PowerPoint.Application(); ppApp.Visible = MsoTriState.msoTrue; Presentations ppPresens = ppApp.Presentations; Presentation objPres = ppPresens.Open(e.FullPath, MsoTriState.msoFalse, MsoTriState.msoTrue, MsoTriState.msoTrue); Slides objSlides = objPres.Slides; Microsoft.Office.Interop.PowerPoint.SlideShowWindows objSSWs; Microsoft.Office.Interop.PowerPoint.SlideShowSettings objSSS; //Run the Slide show objSSS = objPres.SlideShowSettings; objSSS.Run(); objSSWs = ppApp.SlideShowWindows; while (objSSWs.Count >= 1) System.Threading.Thread.Sleep(100); //Close the presentation without saving changes and quit PowerPoint objPres.Close(); ppApp.Quit();
Now I want to close all the running powerpoint files and only want to run the current one only...
Does any body have any idea?
![]() |
Other Threads in the C# Forum
- Previous Thread: Windows forms
- Next Thread: Simpel string sorting
| Thread Tools | Search this Thread |
.net 2007 access ado.net algorithm array barchart bitmap box broadcast buttons c# camera check checkbox client color combobox control conversion cs4 csharp custom database datagrid datagridview dataset date datetime degrees development draganddrop drawing encryption enum event eventcloseformc# excel file form format forms function gdi+ httpwebrequest image index input install java label list listbox listener listview load mandelbrot math mouseclick mysql operator path photoshop picturebox pixelinversion post programming radians regex remote remoting richtextbox search security serialization server sleep socket sql statistics stream string table text textbox thread time timer update usercontrol validation view visual visualstudio webbrowser windows winforms wordautomation wpf xml






