【问题标题】:Autoit COM Error opening a PPT/PPTXAutoit COM 错误打开 PPT/PPTX
【发布时间】:2013-08-01 23:50:06
【问题描述】:

当我尝试打开 PPT,而不是创建一个新的(效果很好!)时,我收到以下错误

$objPPT = _PPT_PowerPointApp()
If @error Then 
    MsgBox(0,"","No PowerPoint available") 
    Exit
EndIf
$PresInterface = _PPT_CreatePresentation($objPPT) ;Get presentation 
interface$objPres = _PPT_PresentationOpen($PresInterface,"C:\Users\s.mailappan\Desktop\3G-Reports\MyAutoItPresentation.ppt") ;Add a new presentation

【问题讨论】:

  • 最后两行可能搞砸了?变量$objPres之前不应该有“接口”...
  • 是的...我搞定了!还是谢谢!!

标签: com powerpoint autoit


【解决方案1】:

要打开现有的 PPT,需要从我的原始代码中删除以下行。

$PresInterface = _PPT_CreatePresentation($objPPT) ;Get presentation 

这使得下面的代码可以工作。

$objPPT = _PPT_PowerPointApp()
If @error Then 
    MsgBox(0,"","No PowerPoint available") 
    Exit
EndIf

$objPres = _PPT_PresentationOpen($objPPT,"C:\Users\s.mailappan\Desktop\3G-Reports\MyAutoItPresentation.ppt") ;Add a new presentation

【讨论】:

    猜你喜欢
    • 2021-04-19
    • 2011-03-20
    • 2017-09-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多