回答:
マクロを記録し、汎用にするために少し変更しました。必要なことを行います。スクリプトは次のとおりです。
Sub replace_path_with_image()
'
' replace_path_with_image Macro
'
'
Selection.Find.ClearFormatting
With Selection.Find
.Text = "c:\users"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.EscapeKey
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Dim Sel As Selection
Set Sel = Application.Selection
Dim FilePath As String
If Sel.Type <> wdSelectionIP Then
FilePath = Sel.Text
End If
Selection.Cut
Selection.InlineShapes.AddPicture FileName:= _
FilePath _
, LinkToFile:=False, SaveWithDocument:=True
Selection.MoveRight Unit:=wdCharacter, Count:=1
End Sub