我在我的powerpoint演示文稿中插入了一个gif,我想使用vba将其导出到一个文件夹中。我试图使用以下代码来执行此操作:
For Each s In ActivePresentation.Slides
shapeAniNum = 0
shapeNum = s.TimeLine.MainSequence.count
While shapeNum <> 0
shapeAniNum = shapeAniNum + 1
animationNum = animationNum + 1
If InStr(s.TimeLine.MainSequence(shapeAniNum).Shape.AlternativeText, ".gif") <> 0 Or InStr(s.TimeLine.MainSequence(shapeAniNum).Shape.AlternativeText, ".GIF") <> 0 Then
s.TimeLine.MainSequence(shapeAniNum).Shape.Export "C:\dink_template\created_files\Animage" & animationNum & ".gif", ppShapeFormatGIF
.....
这会将文件保存在created_files文件夹中,文件扩展名为gif,但不再设置动画。如何进行导出过程并维护gif动画?