ActiveSheet.Pictures.Insert不能处理Excel2007中的远程图像...有谁有别的办法吗?
Public Sub InsertImages()
Dim iIndex As Integer
Dim sImageName As String
Dim sImageCell As String
For iIndex = 3 To 30
sImageName = "http://images.server.com" & ActiveSheet.Range("DV" + Trim(Str(iIndex))).Value
sImageCell = "DW" + Trim(Str(iIndex))
ActiveSheet.Pictures.Insert(sImageName).Select
With Selection.ShapeRange
.Top = Range(sImageCell).Top + 20
.Left = Range(sImageCell).Left + 20
.Height = Range(sImageCell).Height - 40
.Width = Range(sImageCell).Width - 40
End With
Next
End Sub发布于 2011-04-04 01:24:58
查看上面的代码,您是否传入了正确的url?
当使用浏览器发布时,该url是否获取图像(如jpeg)。
将Debug.Print sImageName放在ActiveSheet.Pictures.Insert(sImageName).Select之前。
您生成的URL似乎不正确。
https://stackoverflow.com/questions/5262956
复制相似问题