如何在powerpoint(C#)中为PTC对象设置powerpoint动画? [英] how to set powerpoint animations to OLE objects in powerpoint (C#)?
问题描述
我想在PPTX中为我的OLE对象添加一些动画,但数量很大。
所以我想在C#中这样做。
我打开了我的pptx并找到了我的锐器!
var app = new PPT.Application();& nbsp;
var pptPre = app.Presentations.Open(...);
var sharp1 = pptFstSlide.Shapes.AddOLEObject(...);
$
到OLE对象(sharp1) 我想首先添加"入口"---"Flash一次"动画,从上一页开始。
然后我要添加 "对象动作"---"活动内容" ,以上之后开始。
有人知道如何在C#中执行此操作吗?
谢谢
杰克
我添加了这个:
PPT.Sequence pSequence_01 = pptFstSlide.TimeLine.InteractiveSequences.Add(1);
PPT.Effect pEffect = pSequence_01.AddEffect(sharp1,PPT.MsoAnimEffect.msoAnimEffectFlashOnce,PPT.MsoAnimateByLevel.msoAnimateLevelNone,PPT.MsoAnimTriggerType.msoAnimTriggerWithPrevious);
pEffect.Exit = Microsoft.Office.Core.MsoTriState.msoFalse;发生错误:
System.Runtime.InteropServices.COMException(0x80048240):Sequence.AddEffect:无效请求。
可能还有其他一些方法可以发送COmmandEffect吗?
I want to add a few animations to my OLE objects in PPTX, but the number is huge.
So I would like to do this in C#.
I opened my pptx and find my sharps aready!
var app = new PPT.Application(); var pptPre = app.Presentations.Open(...); var sharp1 = pptFstSlide.Shapes.AddOLEObject(...);
To the OLE object(sharp1) I want to First add "entrance"---"Flash once" animation , started with Previous.
then I want to add "object actions"---"Active Contents" ,started with after Previous.
Do anyone know how to do this in C#?
Thanks
Jack
I added this:
PPT.Sequence pSequence_01 = pptFstSlide.TimeLine.InteractiveSequences.Add(1); PPT.Effect pEffect = pSequence_01.AddEffect(sharp1, PPT.MsoAnimEffect.msoAnimEffectFlashOnce, PPT.MsoAnimateByLevel.msoAnimateLevelNone, PPT.MsoAnimTriggerType.msoAnimTriggerWithPrevious); pEffect.Exit = Microsoft.Office.Core.MsoTriState.msoFalse;Error occurs:
System.Runtime.InteropServices.COMException (0x80048240): Sequence.AddEffect : Invalid request.
maybe there is some other ways to send COmmandEffect?
这篇关于如何在powerpoint(C#)中为PTC对象设置powerpoint动画?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!