Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If i remember correctly, you need to use the "Shapes" property of your sheet.</p> <p>Each Shape object has a TopLeftCell and BottomRightCell attributes that tell you the position of the image.</p> <p>Here's a piece of code i used a while ago, roughly adapted to your needs. I don't remember the specifics about all those ChartObjects and whatnot, but here it is:</p> <pre><code>For Each oShape In ActiveSheet.Shapes strImageName = ActiveSheet.Cells(oShape.TopLeftCell.Row, 1).Value oShape.Select 'Picture format initialization Selection.ShapeRange.PictureFormat.Contrast = 0.5: Selection.ShapeRange.PictureFormat.Brightness = 0.5: Selection.ShapeRange.PictureFormat.ColorType = msoPictureAutomatic: Selection.ShapeRange.PictureFormat.TransparentBackground = msoFalse: Selection.ShapeRange.Fill.Visible = msoFalse: Selection.ShapeRange.Line.Visible = msoFalse: Selection.ShapeRange.Rotation = 0#: Selection.ShapeRange.PictureFormat.CropLeft = 0#: Selection.ShapeRange.PictureFormat.CropRight = 0#: Selection.ShapeRange.PictureFormat.CropTop = 0#: Selection.ShapeRange.PictureFormat.CropBottom = 0#: Selection.ShapeRange.ScaleHeight 1#, msoTrue, msoScaleFromTopLeft: Selection.ShapeRange.ScaleWidth 1#, msoTrue, msoScaleFromTopLeft '/Picture format initialization Application.Selection.CopyPicture Set oDia = ActiveSheet.ChartObjects.Add(0, 0, oShape.Width, oShape.Height) Set oChartArea = oDia.Chart oDia.Activate With oChartArea .ChartArea.Select .Paste .Export ("H:\Webshop_Zpider\Strukturbildene\" &amp; strImageName &amp; ".jpg") End With oDia.Delete 'oChartArea.Delete Next </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload