外部数据源,不好发,我插入图片的代码是这样写吗:axWebBrowser = Nothing
Do Until axWebBrowser IsNot Nothing
Application.DoEvents
Loop
Dim oDocument As object = axWebBrowser.Gettype().InvokeMember("Document", System.Reflection.BindingFlags.GetProperty, Nothing, axWebBrowser, Nothing)
Dim oApplication As object = axWebBrowser.Gettype().InvokeMember("Application", System.Reflection.BindingFlags.GetProperty, Nothing, oDocument, Nothing)
oApplication .quit()
oDocument .Close()
Dim app As New MSWord.Application
try
Dim fileName = ProjectPath & "Attachments\方案申请.doc"
app.Documents.Open(fileName)
app.Documents(fileName).Range(Start:=20, End:=30).InlineShapes.AddPicture(FileName:= _
"D:\123.jpg" _
, LinkToFile:=False, SaveWithDocument:=True)
app.Documents.save
messagebox.show("您已成功插入图片!!")
catch ex As exception
msgbox(ex.message)
finally
app.Quit
End try
这样没有反应的...