I need some help, I need to copy all the images that are inside the sheet of the attached spreadsheet and insert it into another spreadsheet, there are several ways, I even found an activity in balareva that performs this type of task, someone has already managed to perform this type of automation?
Sub CopyImages(OutWbk As String,OutSheet As String)
Dim img As Shape
Dim SourceWorkbook As Workbook
Dim DestinationWorkbook As Workbook
Dim SourceSheet As Worksheet
Dim DestinationSheet As Worksheet
Dim i As Integer
Set SourceWorkbook = ActiveWorkbook
Set DestinationWorkbook = Workbooks.Open(OutWbk)
Set DestinationSheet = DestinationWorkbook.Worksheets(OutSheet)
' Loop through each sheet in the source workbook
For Each SourceSheet In SourceWorkbook.Worksheets
' Loop through each image on the sheet
For Each img In SourceSheet.Shapes
' Check if the shape is image
If img.Type = msoPicture Then
img.Copy
DestinationSheet.Paste Destination:=DestinationSheet.Range("A1").Offset(i, 0)
i = i + 1
End If
Next img
Next SourceSheet
DestinationWorkbook.SaveAs
DestinationWorkbook.Close
End Sub
Use excel file wirh source excel and use invoke vba inside that use excel scope…and save this vba in a text file and gice the details