[COLOR=BLUE]Sub[/COLOR] PiedsDePageImage()
[COLOR=BLUE]If[/COLOR] [COLOR=BLUE]Not[/COLOR] TypeOf Selection [COLOR=BLUE]Is[/COLOR] Range [COLOR=BLUE]Then[/COLOR]
MsgBox [i]"Veuillez sélectionner des cellules et non un objet ou graphique"[/i], vbExclamation, [i]"Exporter_Range_ImageJPG"[/i]
[COLOR=BLUE]Exit[/COLOR] [COLOR=BLUE]Sub[/COLOR]
[COLOR=BLUE]End[/COLOR] [COLOR=BLUE]If[/COLOR]
Application.ScreenUpdating = [COLOR=BLUE]False[/COLOR]
Selection.CopyPicture
Selection.Parent.Paste
Selection.Name = [i]"ImageCellule"[/i]
Selection.ShapeRange.Line.Visible = msoFalse
[COLOR=BLUE]With[/COLOR] Selection.Parent.ChartObjects.Add(0, 0, Selection.Width, Selection.Height).Chart
.Parent.Name = [i]"ChartCellules"[/i]
.ChartArea.Border.LineStyle = 0
.Paste
.Export ThisWorkbook.Path & [i]"\PiedPage.jpg"[/i], [i]"JPG"[/i]
[COLOR=BLUE]End[/COLOR] [COLOR=BLUE]With[/COLOR]
[COLOR=BLUE]With[/COLOR] Selection.Parent
.ChartObjects([i]"ChartCellules"[/i]).Delete
.Shapes([i]"ImageCellule"[/i]).Delete
[COLOR=BLUE]End[/COLOR] [COLOR=BLUE]With[/COLOR]
Application.ScreenUpdating = [COLOR=BLUE]True[/COLOR]
[COLOR=BLUE]With[/COLOR] Selection.Parent.PageSetup
.LeftFooter = [i]""[/i]
.RightFooter = [i]""[/i]
.CenterFooter = [i]"&G"[/i]
.CenterFooterPicture.Filename = ThisWorkbook.Path & [i]"\PiedPage.jpg"[/i]
[COLOR=BLUE]End[/COLOR] [COLOR=BLUE]With[/COLOR]
Selection.Parent.PrintPreview
[COLOR=BLUE]End[/COLOR] [COLOR=BLUE]Sub[/COLOR]