Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- For Each hojaActual In Sheets
- For Each img In hojaActual.Shapes
- On Error Resume Next
- img.Select
- MyPicture = Selection.Name
- With Selection
- PicHeight = .ShapeRange.Height
- PicWidth = .ShapeRange.Width
- End With
- Charts.Add
- ActiveChart.Location Where:=xlLocationAsObject, Name:=hojaActual.Name
- Selection.Border.LineStyle = 0
- MyChart = Selection.Name & " " & Split(ActiveChart.Name, " ")(2)
- With ActiveSheet
- With .Shapes(MyChart)
- .Width = PicWidth
- .Height = PicHeight
- End With
- .Shapes(MyPicture).Copy
- With ActiveChart
- .ChartArea.Select
- .Paste
- End With
- .ChartObjects(1).Chart.Export ruta & hojaActual.Name & "-" & img.Name & ".jpg", "jpg"
- .Shapes(MyChart).Cut
- End With
- Next
- Next
Add Comment
Please, Sign In to add comment