Roderick,
In PowerPoint 97, you need to use the ScaleHeight and ScaleWidth properties
to size the image.
ActiveWindow.Selection.SlideRange.Shapes.AddPicture( _
"C:\Under Development\test.jpeg", _
msoFalse, _
msoTrue, 187, 46, -1, -1).Select
With ActiveWindow.Selection.ShapeRange(1)
.ScaleHeight 1, True
.ScaleWidth 1, True
End With
--
Regards
Shyam Pillai
http://www.mvps.org/skp
"Roderick O'Regan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm trying to insert a picture selected from a dialog. box In PP2000 and
> 2002 the following statement achieves the correct result:
>
> << ActiveWindow.Selection.SlideRange.Shapes.AddPicture(ThisFile, msoFalse,
> msoCTrue, 206, 206).Select >> (the height and width figures are absent
from
> this statement as they are optional. The picture is inserted "as is" onto
> the slide.
>
> However, when I use the above statement in PP97 the height and width ARE
> required hence I have to add two more sets of figures to the end of the
> statement shown. When activated it places the picture on the slide as it
> should but it distorts because of the required H & W sizes.
>
> Is there a way, please, that I can write the statement for PP97 so that
the
> picture is inserted at its correct dimensions onto the slide? When I look
at
> the VBA Help in PP97 it mentions I could use a "Property Set" statement
> which might allow changes to the above so tha the H & W figures could be
> left out. However, no matter which way I "slice and dice" the Help
> explanation it doesn't make too much sense to me as the examples are
rather
> weak in their description.
>
> Could someone have an explanation how I might solve this small, but pesky,
> problem, please?
>
> Thanks
>
> Roderick O'Regan
>
>