Results 1 to 9 of 9

Thread: How to paste & then resize an image

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    VBAX Contributor
    Joined
    May 2008
    Posts
    198
    Location
    The returned value of PasteSpecial is the shaperange which is pasted, so you can use that directly:
    Sub PasteTable()
    Dim myShape As Object
         'paste excel table as enhanced metafile, then resize to full width
    Set myShape = ActiveWindow.Selection.SlideRange(1).Shapes.PasteSpecial(ppPasteEnhancedMetafile)
        With myShape
       .LockAspectRatio = True
       .Top = 70 'points from top
       .Left = 10 'points from left
       .Width = 700 'points wide
        End With
    End Sub
    Last edited by Aussiebear; 04-09-2023 at 09:31 PM. Reason: Adjusted the code tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •