Solved

Problems with PowerPoint Automation using VSTO / C#

Posted on 2009-06-29
3
1,242 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
xenacode earned 50 total points
ID: 24743498
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
ID: 24746490
Actually, I  got this code from MSDN... Thanks anyway... :-)
0
 
LVL 6

Expert Comment

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

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
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 video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

634 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