Powerpoint 2011 Mac报告对象"_Slide"的方法“导出"失败 [英] Powerpoint 2011 Mac reports Method 'Export' of object '_Slide' failed

查看:51
本文介绍了Powerpoint 2011 Mac报告对象"_Slide"的方法“导出"失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Powerpoint 2011(Mac)中,返回以下代码运行时错误'-2147483640(80000008)':对象'_Slide'的方法'导出'失败

In Powerpoint 2011 (Mac), the following code is returning Run-time error '-2147483640 (80000008)': Method 'Export' of object '_Slide' failed

我已经尝试过找到该调用的每个变体,在Windows上都可以正常工作,并且在Mac VBA中应该支持导出作为有效方法调用.在Google中找不到对该错误的任何引用.因此,我为为什么出现这种情况而感到困惑.

I've tried every variant of this call I could find, this works fine on Windows, and as export appears as a valid method call in Mac VBA should be supported. Can't find any references to the error in Google. So I am stumped as to why this is appearing.

局部变量查看器将oSld显示为有效的幻灯片,并将sImagePath显示为有效的文件名.

Local variable watcher shows oSld as a valid slide, and sImagePath as a valid file name.

任何对这里发生的事情的见解将不胜感激....

Any insights into what's going here would be gratefully appreciated....

Sub devtests()
  Dim oSlides As Slides
  Dim sImagePath As String
  Dim oSld As Slide
  Dim oPres As Presentation

  Set oPres = ActivePresentation
  Set oSlides = oPres.Slides
  sImagePath = "MacSSD:Users:myuserdir:test:"
  For Each oSld In oSlides
     sImagePath = sImagePath & Format(oSld.SlideIndex, "000") & ".jpg"
      Call oSld.Export(sImagePath, "JPG")
            'also tried - oSld.Export sImagePath, "JPG"
    Next oSld
End Sub

推荐答案

我可以在这里重现该问题.我认为您已经发现了一个错误.不幸的是,2011 VBA + PowerPoint中有很多'em.据我了解,此版本必须完全重写VBA,并且在命令开发资源时,它始终是继任者.

I can repro the problem here. I think you've turned up a bug. There are lots of 'em in 2011 VBA + PowerPoint, unfortunately. VBA had to be completely rewritten for this release, as I understand it, and it's always the step-child when it comes to commanding dev resources.

我已经将这个问题报告给了一些我在MS认识的Mac型人员.如果我从他们那里收到有用的回音,请告诉您.

I've reported the problem to some Mac-type people I know at MS. Will let you know if I hear anything useful back from them.

这篇关于Powerpoint 2011 Mac报告对象"_Slide"的方法“导出"失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆