views:

41

answers:

1

In Excel 2007 it is possible to scale a pictureLink object (created with the Camera Tool) using the following VBA code.

With ActiveWorkbook.Sheets(sht).Pictures(name)
    .ShapeRange.ScaleWidth scaleValue, msoTrue
    .ShapeRange.ScaleHeight scaleValue, msoTrue
    .top = top
    .left = left
End With

This code places the picture correctly in 2010, but the scaleValue is ignored. The 2010 Excel documentation is patchy on this subject. The same code works fine in Excel 2007.

A: 

In Excel 2010, amazingly, setting the ScaleValue to 75% of what it is in Excel 2007, does the trick. So you would need to create VBA code testing for Application.Version.

vzczc