我需要用文字替换我的word文档中的图像,如: graphic1 - >文本1 graphic2 - >文本2 等
有什么想法吗?那可能吗?
答案 0 :(得分:0)
到目前为止,最好的方法是找到图像的独特属性(如高度和宽度),并将其替换为如下:
Dim myShape As InlineShape
For Each myShape In ActiveDocument.InlineShapes
myShape.Select
ActiveWindow.ScrollIntoView Selection.Range
Select Case myShape.Width
Case "13,5"
Selection.Delete
Selection.TypeText Text:=" g1"
Case "8"
Selection.Delete
Selection.TypeText Text:=" g2"
Case "19,5"
Selection.Delete
Selection.TypeText Text:=" g3"
End Select
Next myShape