
On Error Resume Next
Dim my_Link, my_Pic As String
my_Link = "D:\PHOE\2015夏"
my_Pic = Dir(my_Link & "\" & "*.jpg")
Dim i As Single
i = 2
Do While Len(my_Pic) <> 0
Cells(i, 1) = my_Pic
Cells(i, 3).Select
ActiveSheet.Pictures.Insert (my_Link & "\" & my_Pic)
Worksheets(1).Shapes(Worksheets(1).Shapes.Count).Width = Cells(i, 3).Width
Worksheets(1).Shapes(Worksheets(1).Shapes.Count).Height = Cells(i, 3).Height
i = i + 1
my_Pic = Dir
Loop
End Sub
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)