Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Problems with PowerPoint Automation using VSTO / C#

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
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…
Screencast - Getting to Know the Pipeline

824 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