axWebBrowser = Nothing
Dim dr As Row = CurrentTable.Current
If dr IsNot Nothing Then
Dim web As Object = e.Form.Controls("WebBrowser1").basecontrol
web.Navigate(ProjectPath & "Attachments\" & dr("内容"))
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.ActiveWindow.DocumentMap = False
oDocument.Protect (Password:="123456", NoReset:=False, Type:= _
MsWord.WdProtectionType.wdAllowOnlyReading, UseIRM:=False, EnforceStyleLock:=False)
oDocument.saved = True
vars("doc") = oDocument
End If
Dim refmissing As [Object] = System.Reflection.Missing.Value
Dim args As Object() = New Object(3) {}
args(0) = 24
args(1) = 2
args(2) = refmissing
args(3) = refmissing
axWebBrowser.[Gettype]().InvokeMember("ExecWB", 256, Nothing, axWebBrowser, args)