Foxtable(狐表)用户栏目专家坐堂 → [求助] 隐藏office 的所有栏目


  共有1948人关注过本帖平板打印复制链接

主题:[求助] 隐藏office 的所有栏目

帅哥哟,离线,有人找我吗?
zcgmxf
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:七尾狐 帖子:1634 积分:14432 威望:0 精华:0 注册:2014/6/6 8:42:00
[求助] 隐藏office 的所有栏目  发帖心情 Post By:2016/11/21 20:45:00 [只看该作者]

有点蓝老师,红袍老师给的代码隐藏了部分office 栏目,但是上面还有一个,是否能全部隐藏?

Dim dr As Row = CurrentTable.Current
If dr IsNot Nothing Then
    If dr.IsNull("标题") = False Then
        Dim web1 As Windows.Forms.WebBrowser
        web1 = e.Form.Controls("WebBrowser1").baseControl
        AddHandler web1.DocumentCompleted,addressof WebBrowser1_DocumentCompleted
        axWebBrowser = Nothing
       
        Dim web As Object = e.Form.Controls("WebBrowser1").basecontrol
        web.Navigate("E:\Publish\Project\RemoteFiles\新闻图片内容\" & 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
    Else
        MessageBox.Show("没有相关文字内容!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
        Return
    End If
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)


图片点击可在新窗口打开查看此主题相关图片如下:qq图片20161121204144.png
图片点击可在新窗口打开查看
[此贴子已经被作者于2016/11/21 20:46:15编辑过]

 回到顶部