axWebBrowser = Nothing
Do Until axWebBrowser IsNot Nothing
Application.DoEvents
Loop
Dim Doc As object = axWebBrowser.Gettype().InvokeMember("Document", System.Reflection.BindingFlags.GetProperty, Nothing, axWebBrowser, Nothing)
Dim app As object = axWebBrowser.Gettype().InvokeMember("Application", System.Reflection.BindingFlags.GetProperty, Nothing, Doc, Nothing)
try
doc.Protect (Password:="", NoReset:=False, Type:= _
MsWord.WdProtectionType.wdAllowOnlyReading, UseIRM:=False, EnforceStyleLock:=False)
doc.Range(Start:=20, End:=30).InlineShapes.AddPicture(FileName:= _
"D:\123.jpg" _
, LinkToFile:=False, SaveWithDocument:=True)
Doc.save
messagebox.show("您已成功插入图片!!")
catch ex As exception
msgbox(ex.message)
finally
'app.Quit
End try