Public Sub inset_picture()
Dim ficimg As Variant
ficimg = Application.GetOpenFilename(".jpg,*.jpg", , "Choose the picture") ' choice of the file name
ActiveSheet.Pictures.Insert(ficimg).Select ' insertion
With Selection.ShapeRange
.LockAspectRatio = False ' original proportions when you resize
.Top = ActiveCell.Top ' cell height
.Left = ActiveCell.Left ' left of the cell
.Height = ActiveCell.RowHeight ' height of the cell
.Width = ActiveCell.Width ' width of the cell
End With
With Selection
.PrintObject = True ' the object is printed at the same time of the document
.Placement = xlMoveAndSize ' way that the object is linked to the cellesmanière dont l'objet est lié aux cellules
End With
End Sub