I have a range with images in cell "C". The value I want to rename the pictures is in cell "A". I have this code, and it works great, but I have to manually change every picture.
Is there a way to automate this?
I have 6000 pictures from products.
Sub RenameShape()
Dim objName
On Error GoTo CheckErrors
If ActiveWindow.Selection.ShapeRange.count = 0 Then
MsgBox "You need to select a shape first"
Exit Sub
End If
objName = ActiveWindow.Selection.ShapeRange(1).Name
objName = InputBox$("Assing a new name to this shape", "Rename Shape", objName)
If objName <> "" Then
ActiveWindow.Selection.ShapeRange(1).Name = objName
End If
Exit Sub
CheckErrors:
MsgBox Err.Description
End Sub