利用VBA为什么不能获取Word插入好的图片的文件名?请大神指教!谢谢!

weixin_45820559 2019-10-31 03:38:35
已把插入好的图片设置环绕方式为“四周型”。
MsgBox ActiveDocument.Shapes(1).AlternativeText “没有显示”

If ActiveDocument.Shapes(1).AlternativeText = "D:\wordkaoshi\冬奥会五环.bmp" Then
score = score + 1
End If

想做个Word自动评分的代码
...全文
180 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
mslearn-nashma 2019-12-09
  • 打赏
  • 举报
回复
引用 3 楼 weixin_45820559 的回复:
nashma.blog.jp:还是不行啊!
报什么错误?
weixin_45820559 2019-11-07
  • 打赏
  • 举报
回复
nashma.blog.jp:还是不行啊!
weixin_45820559 2019-11-06
  • 打赏
  • 举报
回复
谢谢!我回去试试!
mslearn-nashma 2019-11-02
  • 打赏
  • 举报
回复
Sub GetSourceFromLinkedShape() Dim shp As Word.Shape Dim sSource As String For Each shp In ActiveDocument.shapes If shp.Type = msoLinkedPicture Then sSource = shp.LinkFormat.SourceFullName End If Next End Sub

5,139

社区成员

发帖
与我相关
我的任务
社区描述
其他开发语言 Office开发/ VBA
社区管理员
  • Office开发/ VBA社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧