zoukankan      html  css  js  c++  java
  • SOAOffice控件

    http://soaoffice.iteye.com/

    SOAOffice笔记  

    2010-04-26 11:52:38|  分类: Soaoffice|字号 订阅

     

    SOAOfficeX.SaveDocObj的ShowPage()的使用,详见帮助文档

    隐藏工具栏和菜单栏

    <SCRIPT language="javascript" event="OnInit()" for="SOAOfficeCtrl">
         // 控件打开文档前触发,用来初始化界面样式
         SOAOfficeCtrl.Menubar = false;
         SOAOfficeCtrl.Toolbars = false;
    </SCRIPT>

    禁用保存按钮,隐藏保存按钮

    SOAOfficeCtrl.EnableFileCommand(3) = false; //禁用office本身的保存按钮

    SOAOfficeCtrl.Document.Application.CommandBars("Standard").Controls(3).Visible = false;//隐藏保存按钮,但只能在2003或以下的版本中有效

    SaveDataURL和SaveDocURL有什么区别

    SaveDocURL指定的页面用来接收文档二进制流。
    SaveDataURL指定的页面用量接收文档中提交的数据区域、form域

    获取前台控件的值在SaveDoc.aspx页面中直接写

    SOAOfficeX.SaveDocObj SOAObj = new SOAOfficeX.SaveDocObj();

    string str = SOAObj.RequestFormField("txtTemp")

    获取某用户修改了多少处

    在服务器端WebOpen打开文档时,用痕迹保留模式

     

    在客户端的contro.js里你能找到下面的函数。你只要修改这个函数,比较Author和你的WebOpen时的UserName参数,如果相等就计一次数,循环完毕就是当前用户修改的总数。

    //获取并显示所有痕迹
    function jsGetAllRevisions()
    {
       var i;
       var str="";
       for (i = 1;i <=document.all("SOAOfficeCtrl").Document.Revisions.Count;i++)
       {
         str=str + document.all("SOAOfficeCtrl").Document.Revisions.Item(i).Author;
         if (document.all("SOAOfficeCtrl").Document.Revisions.Item(i).Type=="1")
    { 
         str=str + ' 插入:'+document.all("SOAOfficeCtrl").Document.Revisions.Item(i).Range.Text+"\\r\\n";
         }
    else
    {
         str=str + ' 删除:'+document.all("SOAOfficeCtrl").Document.Revisions.Item(i).Range.Text+"\\r\\n";
         }
       }
       alert("当前文档的所有修改痕迹如下:\\r\\n"+str);
    }

  • 相关阅读:
    (Good Bye 2019) Codeforces 1270B Interesting Subarray
    (Good Bye 2019) Codeforces 1270A Card Game
    Codeforces 1283D Christmas Trees(BFS)
    Codeforces 1283C Friends and Gifts
    Codeforces 1283B Candies Division
    1095 Cars on Campus (30)
    1080 Graduate Admission (30)
    1099 Build A Binary Search Tree (30)
    1018 Public Bike Management (30)
    1087 All Roads Lead to Rome (30)
  • 原文地址:https://www.cnblogs.com/oneLight/p/2492650.html
Copyright © 2011-2022 走看看