1.可行性:
右键[编辑批注]-单击批注边框-右键[设置批注格式]-选项卡[颜色与线条]-填充-单击颜色-填充效果-图片-选择图片的上部显示的就是名字
2.通过VBA实现了插入批注图片
With ActiveCell.Comment
.Shape.Fill.UserPicture "C:\Documents and Settings\All Users\Documents\My Pictures\示例图片\Sunset.jpg"
End With
测试发现此种方法插入的批注仍然带有名字的
3.查找了好几天都没找到相关代码,希望在这专业论坛上获取到帮助,后面附注上VBA拷贝批注图片的代码,如果有更好的方式希望可以告知一声,麻烦各位了,谢谢。
Dim rngTemp As Range
Set rngTemp = ActiveCell
Application.ScreenUpdating = False
With ActiveCell
.Comment.Visible = True'当初就是少了这句导致,复制了一个空出来,耗费了很久才找到
'.Comment.Shape.Select
.Comment.Shape.CopyPicture _
Appearance:=xlScreen, Format:=xlPicture
.Comment.Visible = False
End With
ActiveSheet.Range("E6").PasteSpecial
Application.ScreenUpdating = True
该代码在图片锁定纵横比且图片未显示完时可能发生拷贝没完,取消纵横比又可能失真,如果有更好的方法希望告知一声,谢谢各位……