I am trying to resize a picture that I have pasted into powerpoint from Excel using powerpoint vba.
My code says:
ActivePresentation.Slides(9).Select
Application.ActiveWindow.View.PasteSpecial DataType:=ppPasteEnhancedMetafile
This part works fine, I am at a loss as how to then resize the picture in the next step. I am new to using powerpoint vba.
Any help would be much appreciated.
Best Answer
Never select anything unless you absolutely must, and you very rarely must.. Get a reference to the shape instead.
You don't actually need to be viewing a slide to manipulate the shapes ON that slide
Use the shape's .Top, .Left, .Height and .Width properties to set its position and size
Example: