>when I create a report in microsoft word everythin goes as planned except I have 2 photographes
>on each page and they should always be of a certain size
>if the height greater 50 make it 50
>if the height smaller 50 make it 50
>and adjust the width
>
>
>I have the following snippet:
>
> p1=[\\dell240\c$\inetpub\wwwroot\sshs\]+ALLTRIM(cc1.babypic)
> IF NOT EMPTY(P1) AND FILE(P1)
> try
> oPicture= .SELECTION.InlineShapes.AddPicture(P1,true,true)
> WITH oPicture
> .scaleHeight=50
> .scalewidth=50
>
> ENDWITH
> CATCH
> ?p1
> endtry
> ENDIF
>
>
>
>and I want all picture to be the same height regardless of picture dimension in file.
>also the ratio width/heit shoud remain
>in other words bigger pics shoul get smaller smaller pics ahoud get bigger in the word document
>
>Thanks
With oPicture
.LockAspectRatio = -1
.Width = 50 * .Width / .Height
.Height = 50
endwith
PS: 50 is in points, if needed word has methods to convert it to and from other units.
Cetin