如:
ldec_x=..//left
ldec_y=..//top
////原始图片大小插入
lole_sheet.Shapes.AddPicture(ls_filename, True, True,ldec_x,ldec_y,-1,-1) //
//lole_sheet.Shapes(lole_sheet.Shapes.Count)//可以引用刚插入的图片
////原始圖片大小
ldec_oripic_w=lole_sheet.Shapes(lole_sheet.Shapes.Count).Width
ldec_oripic_h=lole_sheet.Shapes(lole_sheet.Shapes.Count).Height
lole_sheet.Shapes(lole_sheet.Shapes.Count).left = ldec_x + 2
lole_sheet.Shapes(lole_sheet.Shapes.Count).top = ldec_y + 2
If ldec_w>0 Then
lole_sheet.Shapes(lole_sheet.Shapes.Count).Width =ldec_w
End If
If ldec_h>0 Then
lole_sheet.Shapes(lole_sheet.Shapes.Count).Height=ldec_h
End If
lole_sheet.application.selection.left = ldec_x + 2
lole_sheet.application.selection.top = ldec_y + 2
If ldec_w>0 Then
lole_sheet.application.Selection.ShapeRange.Width =ldec_w
End If
If ldec_h>0 Then
lole_sheet.application.Selection.ShapeRange.Height=ldec_h
End If