I have inline pictures (InlineShapes) in my Word document. The document is an export from third party application (Casewise business process documentation) and it should be formatted and refurbished before final corporation publishing. I'd like to pass through all my pictures (process diagrams) and to resize vector pictures to fit into landscape page.

The issue here is that when I set LockAspectRatio attribute on of InlineShape and change the width of picture, it's height is not changed accordingly. Seems that keeping aspect ratio does not work. Does it mean that I have to recalculate height myself?

Another question regarding pictures (InlineShapes) is, where is stored original picture size (what attributes)?

So my code looks like this;

Sub FormatPictures() 
    Dim š As InlineShape 
    Dim h As Long 
    For Each š In ActiveDocument.InlineShapes 
        š.LockAspectRatio = msoTrue 
        If (š.Width > CentimetersToPoints(27.7)) Then š.Width = CentimetersToPoints(27.7) 
        If (š.Height > CentimetersToPoints(15)) Then š.Height = CentimetersToPoints(15) 
    Next š 
End Sub 

Formatting tags added by mark007
I expect that this code should shrink horizontaly my picture to 27.7 cm if the picture is wider than that and to shrink it verticaly to 15 cm if the picture is higher than that (just to fit it into my available page space). Of course, I expect that in both cases picture should be resized with aspect ratio kept. But...