A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Powerpoint
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

how do I run slideshow with animation ON



 
 
Thread Tools Display Modes
  #1  
Old May 25th, 2010, 10:57 AM posted to microsoft.public.powerpoint
Asian
external usenet poster
 
Posts: 5
Default how do I run slideshow with animation ON

Hello,
I'd like to run PowerPoint slideshow with animation ON in my automation code.
I'd like to move the animation one by one, since I'd like take a screen shot
one by one.

Environment:
• Visual Studio 2008 (using PIA (Microsoft.Office.Interop.PowerPoint))
• Office2007
• C#

Now I can run slideshow and move one slide to next slide with Animation OFF.
But it will be crashed if I replace false to True as follows.
// objSSS.ShowWithAnimation = Microsoft.Office.Core.MsoTriState.msoFalse;
objSSS.ShowWithAnimation = Microsoft.Office.Core.MsoTriState.msoTrue;

How can I move animation one by one in slideshow?
And how can I count animation count? I'd like to know how many times I
should loop.

My current code is as follows:
int nSlides = objPres.Slides.Count;

objSSS = objPres.SlideShowSettings;

Animation objSSS.ShowWithAnimation =
Microsoft.Office.Core.MsoTriState.msoTrue; //Replaced with the following line
-- And crash
//Animation objSSS.ShowWithAnimation =
Microsoft.Office.Core.MsoTriState.msoFalse;

objSSS.RangeType =
Microsoft.Office.Interop.PowerPoint.PpSlideShowRan geType.ppShowAll;
objSSS.ShowType =
Microsoft.Office.Interop.PowerPoint.PpSlideShowTyp e.ppShowTypeSpeaker;
objSSS.LoopUntilStopped = Microsoft.Office.Core.MsoTriState.msoFalse;
objSSS.AdvanceMode =
Microsoft.Office.Interop.PowerPoint.PpSlideShowAdv anceMode.ppSlideShowManualAdvance;

objSlides = objPres.Slides;
int[] SlideIdx = new int[nSlides];
for (int ii = 0; ii nSlides; ii++)
{
SlideIdx[ii] = ii + 1;
}
objSldRng = objSlides.Range(SlideIdx);
objSST = objSldRng.SlideShowTransition;
objSST.AdvanceOnTime = Microsoft.Office.Core.MsoTriState.msoFalse;
objSST.EntryEffect =
Microsoft.Office.Interop.PowerPoint.PpEntryEffect. ppEffectNone;
objSST.Hidden = MsoTriState.msoFalse;

objSSW = objSSS.Run();

objSSWs = PowerpointApplication.SlideShowWindows;

for (int isl = 1; isl = nSlides; isl++)
{
// Snip Capture screenshot code

//move to next slide (I'd like to move to next animation)
objSSWs[1].View.Next();
}
}

Thanks in advance.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:56 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.