Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Powerpoint 2011 Mac reports Method 'Export' of object '_Slide' failed

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

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.

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
like image 333
rodneyt Avatar asked Nov 20 '25 17:11

rodneyt


1 Answers

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.

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.

like image 171
Steve Rindsberg Avatar answered Nov 22 '25 17:11

Steve Rindsberg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!