Help for this page

Select Code to Download


  1. or download this
    or this one if you want to scale the height and width independently of
    + each other
    Sub ScalePicture2(pic As Shape, hscale As Double, vscale As Double)
    ...
    Sub test2()
       ScalePicture2 pic:=ActiveSheet.Shapes("Picture 1"), hscale:=1.4, vs
    +cale:=1.8   'just an example
    End Sub
    
  2. or download this
    However, most of the same commands exist for the InlineShape command, 
    +so this macro works!
    Sub scale37()
            Selection.InlineShapes(1).LockAspectRatio = True
            Selection.InlineShapes(1).ScaleHeight = 37
    End Sub
    
  3. or download this
    $pic_inlineimage ->{LockAspectRatio} = “False”;
    
  4. or download this
    use strict ;
    use OLE;
    ...
    $h_pos = $cell_tg->Left;
    # insert picture with top left hand corner at cell_id
    $pic_cur = $sheet->Pictures->Insert($image_file_full);