Extraire des photos a partir d'un commentaire

Fermé
c.lyes Messages postés 16 Date d'inscription mardi 24 février 2009 Statut Membre Dernière intervention 9 janvier 2013 - Modifié par c.lyes le 13/08/2011 à 03:27
LePierre Messages postés 249 Date d'inscription samedi 8 mars 2008 Statut Membre Dernière intervention 2 août 2012 - 13 août 2011 à 17:06
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

1 réponse

LePierre Messages postés 249 Date d'inscription samedi 8 mars 2008 Statut Membre Dernière intervention 2 août 2012 336
Modifié par LePierre le 13/08/2011 à 17:07
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