Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Problems with PowerPoint Automation using VSTO / C#

Posted on 2009-06-29
3
Medium Priority
?
1,247 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 200 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

Vim Reference Guide

Vim is a powerful text editor favored by many sysadmins and developers - here are some commands that you'll want to keep in your back pocket!

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

730 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