title: paste and resize excel vba
body: <p>I would like to paste an image into a powerpoint slide, and then resize it once I have it pasted,</p>
  
  <p>I dont know the image idex so it needs to be able to be resized immediately afterr being pasted</p>
  
  <p>below doesnt work, please can someone help</p>
  
  <pre><code>Sub PasteOnSlide()
  
  Dim strPresPath As String
  strPresPath = "c://myfile"
  Set oPPTFile = oPPTApp.Presentations.Open(strPresPath)
  
  oPPTFile.Slides(4).Shapes.PasteSpecial(ppPasteEnhancedMetafile).select
  
  With Selection
      .Height = 270
      .Width = 680
      .Left = 20
      .Top = 120
      .ZOrder msoSendToBack
  End With
  
  End Sub
  </code></pre>
  
  <p>i also tried:</p>
  
  <pre><code>set MyShape = oPPTFile.Slides(4).Shapes.PasteSpecial(ppPasteEnhancedMetafile).select
  With MyShape
      .Height = 270
      .Width = 680
      .Left = 20
      .Top = 120
      .ZOrder msoSendToBack
  End With
  
  End Sub
  </code></pre>