Excel 图片URL地址直接显示图片
已有 1842 次阅读2018-6-2 21:48
Test()
Dim Rng As Range
Dim Cell As Range
Dim Index As Integer
Dim Limit As Integer
Dim Max As Integer
Index = 27
Limit = 25
Max = Index + Limit
Set Rng = Range("E" & Index & ":E" & Max)
For Each Cell In Rng
With Cell
Application.ScreenUpdating = False
Dim d As Object, str$
Set d = New DataObject
str = "<table><img src=""" + Cell + "?x-oss-process=image/resize,m_pad,h_120,w_120,color_eeeeee"" width=""100""></table>"
d.SetText str
d.PutInClipboard
Range("E" & Index).Select
Debug.Print "E" & Index & "->" & str
ActiveSheet.PasteSpecial Format:="Unicode 文本", Link:=False, DisplayAsIcon:=False
End With
Index = Index + 1
Next Cell
End Sub