WordPageForOnlyRead.aspx
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:8k
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="WordPageForOnlyRead.aspx.cs" Inherits="Workflow_WordPageForOnlyRead" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" >
- <head id="Head1" runat="server">
- <title>基于WebForms的操作Word</title>
- <meta name="GENERATOR" content="Microsoft Visual Studio 7.0"/>
- <meta name="CODE_LANGUAGE" content="C#"/>
- <meta name="vs_defaultClientScript" content="JavaScript"/>
- <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"/>
- </head>
- <body style="background-color:#ffffff;" onload="soaOpen();window.focus();" onunload="soaClose();">
- <script type="text/javascript">
- var bDocOpen = false;
- function soaOpen()
- {
- var mHttpUrl=location.href;
- var mScriptName = "DaiBan.aspx?strFName";
- var a= mHttpUrl.split('=');
- var sfname="";
- for (var i=0;i<a.length;i++)
- {
- switch (i)
- {
- case 0:
- break;
- case 1:
- sfname = a[i];
- break;
- default:
- break;
- }
- }
- try {
- formData.SOAOfficeCtrl.UserMenuCaption = "自定义菜单(&N)";
- formData.SOAOfficeCtrl.AppendMenuItem(1, "显示痕迹(&S)", false);
- formData.SOAOfficeCtrl.AppendMenuItem(2, "隐藏痕迹(&H)", false);
- formData.SOAOfficeCtrl.AppendMenuItem(3, "-");
- formData.SOAOfficeCtrl.AppendMenuItem(4, "显示标题(&T)");
- formData.SOAOfficeCtrl.AppendMenuItem(5, "-");
- formData.SOAOfficeCtrl.AppendMenuItem(6, "全文手写批注(&D)");
- formData.SOAOfficeCtrl.AppendMenuItem(7, "插入印章(&I)");
- formData.SOAOfficeCtrl.AppendMenuItem(8, "接受所有修订(&A)", false);
- formData.SOAOfficeCtrl.AppendMenuItem(9, "-");
- formData.SOAOfficeCtrl.AppendMenuItem(10, "分层显示手写批注(&G)");
- formData.SOAOfficeCtrl.Caption="芜湖易通信息技术有限公司--在线文档编辑器";
- formData.SOAOfficeCtrl.SaveDocURL = "SaveDoc.asp";
- formData.SOAOfficeCtrl.WebOpen(sfname,2,"2");
-
- return true;
- }
- catch (e)
- {
- var ErrorMsg = '未定义的意外错误。';
- alert(e.description);
- WEBWORD_OBJECT.innerHTML="<div align=center><b><font color=red>文档加载失败,错误信息:"+e.description+"</font></b></div>";
- return false;
- }
- }
- function soaClose()
- {
- try {
- if (bDocOpen)
- formData.SOAOfficeCtrl.Close();
- return true;
- }
- catch (e)
- {
- alert("关闭文档失败!n错误信息:"+e.message);
- return false;
- }
- }
- //文档另存为Html,并发布到web服务器
- function SaveAsHtml()
- {
- try {
- alert("绿色版没有提供另存HTML的功能。");
- //formData.SOAOfficeCtrl.WebSaveAsHtml();
- }
- catch (e)
- {
- alert("保存为Html失败!n错误信息:" + e.message);
- }
- }
- </script>
- <script type="text/javascript" language="JavaScript" event="OnDocumentOpened(str, obj)" for="SOAOfficeCtrl">
- bDocOpen = true;
- </script>
- <script type="text/javascript" language="JavaScript" event="OnDocumentClosed()" for="SOAOfficeCtrl">
- bDocOpen = false;
- </script>
- <script type="text/javascript" language="JavaScript" event="OnUserMenuClick(index, caption)" for="SOAOfficeCtrl">
- if(index == 1) soaShowTrack(true);
- if(index == 2) soaShowTrack(false);
- if(index == 4) alert("该菜单的标题是:"+caption);
- if(index == 6) soaStartHandDraw();
- if(index == 7) soaInsertSeal();
- if(index == 8) soaAcceptAllRevisions();
- if(index == 10) soaShowHandDrawDispBar();
- </script>
-
- <form name="formData" method="post" action="UploadDoc.asp?Type=word&ID=1" id="formData" runat="server">
-
-
- <table cellSpacing=0 cellPadding=0 width="100%" border=0 >
- <tr>
- <td height="4"></td>
- </tr>
- </table>
-
- <table height="10" cellSpacing="0" cellPadding="0" width="100%" border="0" bgcolor="">
- <TBODY>
- <TR>
- <td width="10" height ="10" align="left" > <IMG src="images/img_blanklogo_1.gif" width="10" height="10"></td>
- <td width="98%" background="images/img_blanklogo_2.gif" align="center"></td>
- <td width="10" align="right"><IMG src="images/img_blanklogo_3.gif" width="10" height="10"></td>
- </TR>
- </TBODY>
- </table>
- <table height="21" cellSpacing="0" cellPadding="0" width="100%" border="0" bgcolor="#EEEEEE">
- <TBODY>
- <TR>
- <td width="6" bgcolor="#FFFFFF"> </td>
- <td style="font-size:9pt" width=140 nowrap> SOAOffice2007 控件 </td>
- <td><SPAN class="ltsep">|</SPAN></td>
- <td style="font-size:9pt" width=177 nowrap> 当前操作模式:<font color="#FF0000">修改无痕迹</font></td>
- <td><SPAN class="ltsep">|</SPAN></td>
- <td style="font-size:9pt" width="100%"> 文档主题:<input name="inputSubject" class=thinInput type="text" value="word"><font color="#FF0000"> 双击控件标题栏最大化运行</font></td>
- <td width="5" bgcolor="#FFFFFF"> </td>
- </TR>
- </TBODY>
- </table>
-
- <table cellSpacing="0" cellPadding="0" width="100%" border="0">
- <TBODY>
- <TR vAlign="top">
- <td style="OVERFLOW-X: hidden" width="10" height="100%" bgcolor="#FFFFFF"> </td>
- <td width="100%">
- <fieldset >
- <table cellspacing="0" cellpadding="0" width="100%" border="0">
- <tr>
- <td>
- <tbody>
- <tr valign="top" align="left">
- <td height="655"><span id="WEBWORD_OBJECT">
- <%--<object id="SOAOfficeCtrl" codebase="http://localhost:3190/Web/Workflow/SOAOffice.ocx#version=3,1,1,0" height="100%"
- width="100%" classid="clsid:BBD0982A-63C3-4105-B7AF-5FF3E2649082" data="">--%>
- <object id="SOAOfficeCtrl" codebase="<%=BaseUrl%>SOAOffice.ocx#version=3,1,1,0" height="100%"
- width="100%" classid="clsid:BBD0982A-63C3-4105-B7AF-5FF3E2649082" data="">
- <%--<param name="Server" value="<%=ServerIP%>">--%>
- <param name="ServerPort" value="4357">
- <param name="BorderStyle" value="0">
- <param name="TitleBarColor" value="16777215">
- <param name="TitlebarTextColor" value="0">
- <%--<param name="MenubarColor" value="<%=menubarColor%>">
- <param name="MenubarStyle" value="<%=Int((6 * Rnd()) + 1)%>">--%>
- <span style="color:red">未能载入SOAOfficeCtrl文档控件。请在安装控件的提示对话框里确认安装,才能使用本控件的功能。</SPAN>
- </object>
- </span>
- </td>
- </tr>
- </tbody>
- <%-- http://localhost:3190/Web/Workflow/DocTemplate项目预算表.doc--%>
- </td>
- </tr>
- </table>
- </fieldset>
- </td>
- <td style=" overflow:hidden;" width="10" height="100%" bgcolor="#FFFFFF"> </td>
- </TR>
- </TBODY>
- </table>
-
- </form>
- </body>
- </html>