我正在开发一个PowerPoint2007
附加组件,VSTO(Visual Studio Tools for Office)
我正在尝试添加一个wavfile
幻灯片并修改波形文件的动画设置。当我修改AnimationSettings.PlaySettings's
波形文件形状的成员属性然后删除幻灯片中的一些动画效果时出现问题。这种行为非常奇怪。我不明白为什么我修改了PlaySettings的成员属性后删除了一些动画效果。
代码 :
Shape s = Globals.ThisAddIn.Application.ActivePresentation.Slides[slideIndex].Shapes.AddMediaObject(wavFilePath, 0f, 0f);
s.Left = DEFAULT_LEFT_POS;
// If the below code run, some of animation effect are deleted.
s.AnimationSettings.Animate = Microsoft.Office.Core.MsoTriState.msoTrue;
s.AnimationSettings.AdvanceMode = PpAdvanceMode.ppAdvanceOnTime;
s.AnimationSettings.AnimationOrder = 0;
s.AnimationSettings.PlaySettings.PauseAnimation = Microsoft.Office.Core.MsoTriState.msoFalse;
s.AnimationSettings.PlaySettings.PlayOnEntry = Microsoft.Office.Core.MsoTriState.msoTrue;
谁能帮我?