title: VBA - Error 1004 - CopyPicture of method class failed
body: <p>i need some help with my code. I wrote a macro which copies many tables as pictures from different Excel files to PowerPoint, but sometimes it works perfectly, and sometimes appears Error 1004 - CopyPicture of method class failed. Here is my code:</p>
  
  <pre><code>Sheets("List1").Select
  ' group chart
  ActiveSheet.Outline.ShowLevels RowLevels:=0, ColumnLevels:=1
  ' select cells to be copied to PowerPoint:
  Range("A1:X83").Select
  ' copy cells:
  Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture
  ' paste to PowerPoint:
  
  pptSld.Shapes.Paste.Select
  </code></pre>
  
  <p>I found that for someone was helpful inserting <code>Sheets("List1").</code> before <code>Range("A1:X83").Select</code>, but it didn't help.
  I have this problem at work, where I'm using Office 2010. At home I have Office 2016 and code works perfectly.</p>
  
  <p>Do you have any ideas, how to make it work without any errors?</p>