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