MODERATOR NOTICE: This topic has also been posted on other sites and may already have an answer elsewhere. Please take this into consideration when answering this question
We are looking forward a solution to export all images from one excel with name that can be created according the 1st line and 1st row.
[Blocked Image: https://www.mrexcel.com/board/…/1614073190976-png.32823/]
Attacked images like this
[Blocked Image: https://www.mrexcel.com/board/…/1614073243903-png.32824/]
I found a vba code that working but not exactly as we need it cause it working only by 1st column and also overwrite the photos.
- For Each oShape In ActiveSheet.Shapes
- strImageName = ActiveSheet.Cells(oShape.TopLeftCell.Row, 1).Value
- '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
- Set oDia = ActiveSheet.ChartObjects.Add(0, 0, oShape.Width, oShape.Height)
- Set oChartArea = oDia.Chart
- With oChartArea
- .Export ("H:\Webshop_Zpider\Strukturbildene\" & strImageName & ".jpg")
- End With
- oDia.Delete 'oChartArea.Delete
- Thank you very much in advance for your time.