在excel里的批注里是不可以批量添加图片的,只能一次添加一张,具体步骤如下:
需要准备的材料分别是:电脑、Excel表格。
1、首先打开需要编辑的Excel表格,右键单击批注的四边选择打开“设置批注格式”。
2、然后在d出来的窗口中点击打开“颜色与线条”。
3、然后在d出来的窗口中点击打开颜色中的“填充颜色”。
4、然后在d出来的窗口中点击打开图片中的“选择图片”。
5、然后点击选择想要的图片,点击打开。
6、然后就可以添加图片了。
在EXCEL中找到“插入”按钮
在插入中找到“图片”按钮
在图片下拉菜单中
找到你需要插入图片的来源;比如插入本地图片
找到目标文件夹
然后按住“CTRL”+鼠标左键,选择需要添加的图片,可实现多个图片选择,多个图片同事批量插入
希望以上对您有所帮助,望采纳
Sub pztp()
On Error Resume Next
Dim c As Range, P$, i&, a$, b$, arr, w!
P = "F:\唐狮图片\唐狮图片\"
For Each c In Range([c2], Cells(Rows.Count, 3).End(3))
With c
.ClearComments
.AddComment
.Comment.Shape.Fill.UserPicture P & .Value & ".jpg"
a = get_file_dim(P & .Value & ".jpg")
For i = 1 To Len(a)
If Mid(a, i, 1) Like "[0-9x]" Then
b = b & Mid(a, i, 1)
End If
Next
arr = Split(b, "x")
b = ""
w = 200 '设置图片宽度
.Comment.Shape.Width = w
.Comment.Shape.Height = Val(arr(1)) / Val(arr(0)) * w
End With
Next
End Sub
Function get_file_dim(ByVal filepath As String)
arr = [{161,162,163,164,31}]
Dim brr(), sz, i As Byte
ReDim brr(1 To UBound(arr))
Set ObiFolder = CreateObject("shell.Application").Namespace(Left(filepath, InStrRev(filepath, "\")))
For i = 1 To UBound(arr)
sz = ObiFolder.getdetailsof(ObiFolder.Items.Item(Right(filepath, Len(filepath) - InStrRev(filepath, "\"))), arr(i))
If sz Like "*[0-9] x [0-9]*" Then
get_file_dim = sz
Exit For
End If
Next i
End Function
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)