Sub image()
Dim p As Range, I&, Chemin$, Q&, Folder
Application.ScreenUpdating = False
Folder = "C:\mesdocuments"
If Dir(Folder, vbDirectory) = "" Then MkDir Folder
For I = 1 To Sheets.Count
Chemin = Folder & "\" & Sheets(I).Name & " - " & [I5] & ".jpg"
Set p = Sheets(I).Range("A1:z30")
p.CopyPicture
With Sheets(I)
With .ChartObjects.Add(0, 0, p.Width, p.Height)
Do While .Chart.Pictures.Count = 0
.Chart.Paste
Loop
.Chart.Export Chemin
.Delete
End With
End With
Q = Q + 1
Next I
Sheets(2).Select
Application.ScreenUpdating = True
MsgBox ("Les " & Q & " documents JPG viennent d'être créés et son disponnibles dans le répertoire C:\mesdocuments ")
End Sub