Une image dans un commentaire

Comment mettre une photo dans un commentaire ?

Sans macro : Fais un clic droit sur le bord du commentaire et choisis "Format de commentaire". Choisis l'onglet "Couleurs et traits", dans la partie "remplissage", clique sur la flèche de la liste déroulante "Couleur", clique sur "Motifs et tectures", et sur l'onglet "Image", Clique sur "sélectionner l'image" et choisis ton image.
avec macro

sub ImageFondCommentaire()
 ChDir ActiveWorkbook.Path
 For Each c In ActiveSheet.Comments
  c.Shape.Fill.UserPicture "fond_nico.jpg"
  c.Shape.Height = 100
  c.Shape.Width = 100
  c.Shape.ScaleHeight 1.2, msoFalse, msoScaleFromTopLeft
  c.Shape.ScaleWidth 1, msoFalse, msoScaleFromTopLeft
 Next c
 end sub

ou encore

sub Trombine()
  ChDir ActiveWorkbook.Path
  Range("A2").Select
  Do While ActiveCell <> ""
    ActiveCell.ClearComments
    ActiveCell.AddComment
    ActiveCell.Comment.Text Text:=ActiveCell.Value
    ActiveCell.Comment.Shape.Fill.UserPicture ActiveCell.Value &
 ".jpg"
    ActiveCell.Comment.Shape.Height = 50
    ActiveCell.Comment.Shape.Width = 50
    ActiveCell.Comment.Shape.ScaleHeight 1.2, msoFalse,
 msoScaleFromTopLeft
    ActiveCell.Comment.Shape.ScaleWidth 1, msoFalse,
 msoScaleFromTopLeft
    ActiveCell.Offset(1, 0).Select
  Loop
 end sub

Auteurs : ,

Mots clefs associés à cette page : , ,