title: How to Export a Table (Shape) as JPG from Powerpoint
body: <p>I am able to export Charts as JPG files from Powerpoint, but haven't been able to do this with a table, which as far as I can tell is still a "Shape" which should be able to export.</p>
  
  <p>This is a cleansed version of the code I use to export the Chart as JPG.</p>
  
  <pre><code>Const imgFilePath as String = "ChartImage.JPG"
  Sub ExportChartJPG()
  Dim cht as Variant  'this will hold the Chart/Shape object
  
  Set cht = ActivePresentation.Slides(1).Shapes("Chart1").Chart
  
  On Error Resume Next
      Kill imgPath
  On Error GoTo 0
  
  cht.Export imgPath, "JPG"
  
  End Sub
  </code></pre>
  
  <p>I figured this would be simple to modify, like:</p>
  
  <pre><code>Sub ExportChartJPG()
  Dim cht as Variant  'this will hold the Chart/Shape object
  
  Set cht = ActivePresentation.Slides(1).Shapes("Table1").Table
  
  On Error Resume Next
      Kill imgPath
  On Error GoTo 0
  
  cht.Export imgPath, "JPG"
  
  End Sub
  </code></pre>
  
  <p>But this is throwing an error <code>13</code> Mismatch.</p>
  
  <p>I have also tried dimensioning <code>cht</code> as a Shape instead of Variant, and setting <code>cht = ActivePresentation.Slides(1).Shapes("Table1")</code>, also unsuccessfully.</p>