Sub temp()
Dim c As Range, i As Long, img As String
'画像フォルダーのパス
Const imgFolderPath = "C:\Users\mabo-2021\Desktop\ブログー移行\tesut\"
For i = 2 To Cells(Rows.Count, 3).End(xlUp).Row
Set c = Cells(i, 1)
img = imgFolderPath & c.Offset(, 2).Text & ".jpg"
MsgBox img
MsgBox Dir(img)
If Dir(img) <> "" Then
With ActiveSheet.Shapes.AddPicture(img, msoFalse, msoTrue, c.Left, c.Top, -1, -1) '//-1→元のサイズ
'expression. AddPicture(Filename ,LinkToFile,SaveWithDocument,Left,Top,Width,Height)
.LockAspectRatio = True
.Placement = xlMove
.Height = c.Height
If .Width > c.Width Then
.Width = c.Width
.Top = c.Top + (c.Height - .Height) / 2
End If
End With
Else
c.Value = "No Image"
End If
Next i
End Sub