Extraire des photos a partir d'un commentaire

c.lyes Messages postés 19 Statut Membre -  
LePierre Messages postés 249 Statut Membre -
salut.
voila, j'ai une page excel ou j'ai insérer plusieurs commentaire en fichiers photo, ma question est : comment faire pour récupérer ces photo a partir de ces commentaire car j'ai plus les photos sur mon disque.
merci de votre aide
A voir également:

1 réponse

LePierre Messages postés 249 Statut Membre 338
 
Bonjour
J'ai trouvé ce code sur un forum. Il permet d'enregistrer sur le disque l'image insérée dans un commentaire.
Sub test()
    Application.ScreenUpdating = False
    With ActiveCell.Offset(, 1)
        If Not .Comment Is Nothing Then
            .Comment.Visible = True
            .Comment.Shape.CopyPicture
             With .Parent.ChartObjects.Add(0, 0, .Comment.Shape.Width, .Comment.Shape.Height).Chart
                .Paste
                .Export ThisWorkbook.Path & "\tmp.jpg", "JPG"
             End With
             .Parent.ChartObjects(.Parent.ChartObjects.Count).Delete
            .Comment.Visible = False
        End If
    End With
    Application.ScreenUpdating = True

End Sub

à plus
0