I'd like to create a macro to make an inserted image automatically resize to
3.5" tall, but when I record a macro the code automatically populates the
width to a specific dimension also, which could possibly distort the image.
I'm new to VBA, so I was wondering if it's possible to write code to resize
the height of an image programatically so that it will adjust the width
proportionally? I don't expect anyone to write it for me, just let me know
if that's possible. If it is, I'll make an attempt (with a guide book in
hand...) and ask the group if I get stuck.
Thanks in advance for any help/suggestions.
Jezebel - 30 Mar 2005 00:23 GMT
Get a reference to the image. Then either set the LockAspectRatio property
to true and set the height, or recalculate the width and set the height --
Width = OldWidth * NewHeight / OldHeight
Height = NewHeight
You'll need to convert the units -- width and height are in points.
> I'd like to create a macro to make an inserted image automatically resize
> to
[quoted text clipped - 10 lines]
>
> Thanks in advance for any help/suggestions.