| | |
How to control Ms Powerpoint 2007 Slide show using C# 3.5?
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2006
Posts: 116
Reputation:
Solved Threads: 0
hi all,
i want to run the slide show say ten slides and then close it programaatically , but in my code given below it opens the slide show and closes immediately ... ..
please give me a solution to this problem
I have tried with
but not worked.
i want to run the slide show say ten slides and then close it programaatically , but in my code given below it opens the slide show and closes immediately ... ..
please give me a solution to this problem
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(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.StartingSlide = 1; objSSS.EndingSlide = objSlides.Count; objSSS.Run(); objSSWs = ppApp.SlideShowWindows; for (int i = objSSS.StartingSlide; i <= objSSS.EndingSlide; i++) { System.Threading.Thread.Sleep(100); } //Close the presentation objPres.Close(); while (System.Runtime.InteropServices.Marshal.ReleaseComObject(objPres) > 0) { }; objPres = null; while (System.Runtime.InteropServices.Marshal.ReleaseComObject(ppPresens) > 0) { }; ppPresens = null; ppApp.Quit(); while (System.Runtime.InteropServices.Marshal.ReleaseComObject(ppApp) > 0) { }; ppApp = null;
I have tried with
C# Syntax (Toggle Plain Text)
System.Threading.Thread.Sleep(10000);
![]() |
Similar Threads
- Help with automatic update problem and more (Viruses, Spyware and other Nasties)
Other Threads in the C# Forum
- Previous Thread: Appending the content of a text file to another text file
- Next Thread: Memory Leak
| Thread Tools | Search this Thread |
.net access algorithm array asp.net barchart bitmap box broadcast c# check checkbox client combobox control conversion csharp custom database databaseconnection datagrid datagridview dataset datetime dbconnection degrees design development draganddrop drawing encryption enum event eventhandlers excel file firefox form format forms function gdi+ grantorrevokepermissionthroughc#.net httpwebrequest image index input install java label libraries list listbox loop mandelbrot marshalbyrefobject math mouseclick movingimage mysql mysql.data.client operator path photoshop picturebox pixelinversion platform post programming radians regex remote remoting resourcefile richtextbox server sleep socket sql statistics stream string system.servicemodel table tcpclientchannel text textbox thread time timer update usercontrol validation visualstudio webbrowser windows winforms wpf wpfc# xml





