can i use a macro to auto resize a pic?

  • Thread starter Thread starter theintern
  • Start date Start date
T

theintern

I need a macro to autoresize a pic to fill up as much of the top half
(approximately) of a slide as possible. Is there a way to do this?

thanks
scott
 
How do I "use the "hammer" button to make any other shape fit into that
defined/memorized area"? Each time i click on it, it tells me i need to
select an object. How do i define the area i want it to fill?

thanks
scott
 
I may have it figured out now, but i need it in a macro, and thanks to there
being no recording tool, and my complete lack of VBA, you know what lines of
code would allow for the picture just pasted to a slide to then be auto
resized to that shape? you can assume the pic is already pasted. i just
need the code to resize it.

thanks
scott
 
works beautifully. Thanks!

Steve Rindsberg said:
Assuming the shape is also selected, you can do something like:

With ActiveWindow.Selection.ShapeRange(1)
' this will be true or false depending on what
' you're after:
.LockAspectRatio = msoFalse
' set the size/position
.Left = xx
.Top = xx
.Height = xx
.Width = xx
End With

You'd need to calculate the values for each parameter. If you don't care whether
the shape is distorted or not, so long as it fits your target area, then just use
the left, top, height and width of your target area directly. In that case, also
set .LockAspectRatio to msoFalse




-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 
Back
Top