分开处理
Dim app As New MSWord.Application
try
Dim fileName = "d:\test.doc"
Dim doc = app.Documents.Open(fileName)
For Each shape As object In doc.InlineShapes
If shape.Type = MSWord.WdInlineShapeType.wdInlineShapePicture
Dim img As Byte() = shape.Range.EnhMetaFileBits
Dim bmp As new Bitmap(new IO.MemoryStream(img))
'bmp.Save("d:\test.jpg")
msgbox(1)
End If
Next
For Each shape As object In doc.Shapes
msgbox(shape.Type)
If shape.Type = 13
Dim img As Byte() = shape.Range.EnhMetaFileBits
Dim bmp As new Bitmap(new IO.MemoryStream(img))
'bmp.Save("d:\test.jpg")
msgbox(2)
End If
Next
catch ex As exception
msgbox(ex.message)
finally
app.Quit
End try
[此贴子已经被作者于2016/8/8 23:01:38编辑过]