How to paste & then resize an image
hi, I Have borrowed one of John's magic modules to resize a shape, and tried to marry it with a paste command - end result is paste as enhanced metafile, then set position and size <not> :think:
I need to activate the shape to make it work under the current approach. How can I reliably identify it? or is there a better way?
Code:
Sub PasteTable()
Dim myShape As Object
'paste excel table as enhanced metafile, then resize to full width
ActiveWindow.Selection.SlideRange(1).Shapes.PasteSpecial ppPasteEnhancedMetafile
Set myShape = ActiveWindow.Selection 'for debugging
With ActiveWindow.Selection.ShapeRange(1)
.LockAspectRatio = True
.Top = 70 'points from top
.Left = 10 'points from left
.Width = 700 'points wide
End With
End Sub
Thanks all.
hmmm. not as good as I hoped....
Quote:
Originally Posted by Cosmo
Code:
Set myShape = ActiveWindow.Selection.SlideRange(1).Shapes.PasteSpecial(ppPasteEnhancedMetafile)
is giving me a " Shapes (unknown member) : invalid request. The specified data type is unavailable." error
I am using ppt 2007, and am not sure what I have missed. ideas?
Thanks