| | |
How to control Ms Powerpoint 2007 Slide show using C# 3.5?
Please support our C# advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
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 angle array asp.net bitmap box broadcast c# capturing check checkbox client combobox control conversion csharp database databasesearch datagrid datagridview dataset datetime dbconnection degrees delegate design development disappear draganddrop drawing encryption enum eventhandlers excel file firefox form format forms function gdi+ grantorrevokepermissionthroughc#.net image input install interface java libraries list loop marshalbyrefobject math monodevelop mouseclick movingimage msword mysql operator path pause photoshop php picturebox pixelinversion platform post programming radians regex remoting richtextbox server sleep socket sql statistics string study system.servicemodel table tcpclientchannel text textbox thread time timer update usb usercontrol validation virtualization visualbasic visualstudio webbrowser winforms wpf wpfc# xml





