【发布时间】:2018-05-05 15:18:13
【问题描述】:
我编写了一些 VBA 代码来更改所有图像的所有源位置。但是它只检测到 3 个 InlineShapes。还有很多。我将所有图像插入为 Insert 和 LINK
Sub ChangesSource()
Dim i As Long
Documents("Document.docx").Activate
Debug.Print ActiveDocument.Name
With ActiveDocument
For i = 1 To .InlineShapes.Count
With .InlineShapes(i)
'.shp.LinkFormat.SourceFullName =
.LinkFormat.SourceFullName = Replace(.LinkFormat.SourceFullName, "C:\oldLink", "C:\newLink")
Debug.Print .LinkFormat.SourceFullName
'Debug.Print InlineShapes(i).SourceFullName
End With
Next i
End With
End Sub
【问题讨论】:
-
根据网站指南,这“太宽泛了”。也不清楚您是否正在寻找编程解决方案......除非您可以展示一些研究工作,否则这将是关闭的。但是,请查看stackoverflow.com/q/50129110/3077495,看看这是否会给您一个良好的开端。
标签: ms-word