Solved

Problems with PowerPoint Automation using VSTO / C#

Posted on 2009-06-29
3
1,220 Views
Last Modified: 2013-11-10
Hi,

I have problem using VSTO (I'm using C#).

I want to start and monitor a powerpoint slideshow.
I am able to start the presentation but the next-page/previous-page (Down/Up, Page-Down/Up) buttons do not work - they simply do not respond. Even rlight-click on the slide-show window (with previous/next/end-slideshow context menu) does not work.
Everything else works - specifically, "Esc" to stop the slideshow.

Pls help.


SlideShowSettings sss = currentPresentation.SlideShowSettings;

//sss.StartingSlide = 1;

//sss.EndingSlide = currentPresentation.Slides.Count;

SlideShowWindow win = sss.Run();
 

while (Application.SlideShowWindows.Count >= 1)

{

	System.Windows.Forms.Application.DoEvents();

}
 

MessageBox.Show("Show finished...");

Open in new window

0
Comment
Question by:mgaurav
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
xenacode earned 50 total points
Comment Utility
What is the purpose of the While loop? If you want to run some code when the slide show exits you can create a handler for the Application objects SlideShowEnd event and put your code in there i.e. the Messagebox line. If you remove the While loop, the slideshow will respond.

Pete
0
 
LVL 2

Author Comment

by:mgaurav
Comment Utility
Actually, I  got this code from MSDN... Thanks anyway... :-)
0
 
LVL 6

Expert Comment

by:xenacode
Comment Utility
Wow! They posted that on MSDN? It's no wonder that so many developers are struggling to create good VSTO applications!
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now