If ActiveDocument.Shapes(1).AlternativeText = "D:\wordkaoshi\冬奥会五环.bmp" Then
score = score + 1
End If
想做个Word自动评分的代码
...全文
1804打赏收藏
利用VBA为什么不能获取Word插入好的图片的文件名?请大神指教!谢谢!
已把插入好的图片设置环绕方式为“四周型”。 MsgBox ActiveDocument.Shapes(1).AlternativeText “没有显示” If ActiveDocument.Shapes(1).AlternativeText = "D:\wordkaoshi\冬奥会五环.bmp" Then score = score + 1 End If 想做个Word自动评分的代码
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