powerpoint 2013 - 导出到视频的进度 [英] powerpoint 2013 - progress for export to video
问题描述
我正在开发一个应用程序,它从磁盘读取 Powerpoint 演示文稿并使用以下伪代码将其保存为视频格式:
I'm working on an application which reads a Powerpoint presentation from disk and saves it in video format using the following pseudocode:
var app = new ppt.Application();
ppt.Presentation file = app.Presentations.Open(
this.SourceFilename,
MsoTriState.msoFalse,
MsoTriState.msoFalse,
MsoTriState.msoFalse);
file.CreateVideo(this.DestinationFilename);
while (true)
{
switch (file.CreateVideoStatus)
{
case PpMediaTaskStatus.ppMediaTaskStatusDone: ...
case PpMediaTaskStatus.ppMediaTaskStatusFailed: ...
case PpMediaTaskStatus.ppMediaTaskStatusInProgress ...
这个过程需要很长时间才能完成,所以我想添加一个进度指示器.我知道这个进度信息是可用的 - 从 Powerpoint 中导出到视频时,Powerpoint 本身会显示一个确切的进度条.有没有办法读取这个进度,把它作为一个事件,或者在 powerpoint api 周围浏览以获得某种进度百分比?非常感谢所有帮助.
this process takes very long to complete, so I would like to add a progress indicator. I know that this progress information is available - Powerpoint itself shows an exact progress bar when exporting to video from within powerpoint. Is there a way to read this progress, get this as an event, or poke around the powerpoint api to get some kind of progress percentage? All help is greatly appreciated.
推荐答案
我认为轮询 ResampleMediaTasks.PercentComplete 可能会满足您的需求.我自己还没有尝试过,但 PPT VBA 中的(像往常一样,可悲地缺乏和不完整)帮助表明这是您想要的
I think that polling ResampleMediaTasks.PercentComplete might give you what you're after. Haven't tried it myself but the (as usual, pathetically scant and incomplete) help in PPT VBA suggests that it's what you want
这篇关于powerpoint 2013 - 导出到视频的进度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!