Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包含多个图像的 Word 文档。这些图像位于硬盘驱动器上的一个子文件夹中,它们链接到 Word 文档中。
我想选择一个图像并执行一个宏,然后打开一个消息框并让我知道图像的完整路径。
这是给你的代码:
Sub GetFullPath() On Error Resume Next Dim fullPath As String fullPath = Selection.ShapeRange(1).LinkFormat.SourceFullName fullPath = Selection.InlineShapes(1).LinkFormat.SourceFullName MsgBox fullPath End Sub