我一直在根据每个查询的结果将图像添加到 Excel 工作表中。我尝试了一个返回 1000 个结果的查询(每个结果都在一个新行中),但只显示了 405 个相关图片。一张纸上有最大数量的图片还是我做错了什么?
Sub insertLocalPicture(localPicFileDir As String, PictureFileName As String)
Dim pic As Shape
Dim xTop As Integer
xTop = ActiveCell.Top + 1
Set pic = ActiveSheet.Shapes.AddPicture(localPicFileDir + PictureFileName + ".jpg", msoFalse, msoTrue, 0, 0, 100, 100)
With pic
.Top = xTop
.Left = 0
.Width = 107
.Height = 80
End With
Set pic = Nothing
End Sub