Excel精英培训网

 找回密码
 注册
数据透视表40+个常用小技巧,让你一次学会!
查看: 1126|回复: 0

求助VBA网址路径导图到批注或单元格的方法

[复制链接]
发表于 2022-9-15 16:36 | 显示全部楼层 |阅读模式
本帖最后由 soulcolor 于 2022-9-15 16:36 编辑

不带图源,到任何一台电脑上都可以执行代码获取图片
Sub 图片()

    Sheets("sheet1").Activate
    Range("A1").Select
    Selection.ClearComments

On Error Resume Next
   For Each c In Selection
   With c.AddComment(Text:=c.Value)
   .Shape.Width = 300
  .Shape.Height = 400
  .Visible = False
   .Shape.Fill.UserPicture "https://coms.igreat-smart.com/attachment/view/item/" & c.Value & "?tenantId=A0000001?tenantId=A0000001.jpg"
End With
If Err <> 0 Then
        c.Comment.Delete
      Err.Clear
  End If
Next
End Sub


求这个是图片的路径,我想自己弄一个这样的网络路径导图片,不知道是通过什么方式实现
https://coms.igreat-smart.com/attachment/view/item/" & c.Value & "?tenantId=A0000001?tenantId=A0000001.jpg

导图模板.zip

373.42 KB, 下载次数: 1

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2024-5-21 14:47 , Processed in 0.248429 second(s), 11 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表