📄 draftedit.aspx
字号:
}catch(e){}
}
function WebSetWordContent(){
var mText=window.prompt("请输入内容:","测试内容");
if (mText==null){
return (false);
}
else
{
//下面为显示选中的文本
//alert(webform.WebOffice.WebObj.Application.Selection.Range.Text);
//下面为在当前光标出插入文本
webform.WebOffice.WebObj.Application.Selection.Range.InsertAfter (mText+"\n");
//下面为在第一段后插入文本
//webform.WebOffice.WebObj.Application.ActiveDocument.Range(1).InsertAfter(mText);
}
}
function WebGetExcelContent(){
webform.WebOffice.WebObj.Application.Sheets(1).Select;
webform.WebOffice.WebObj.Application.Range("C5").Select;
webform.WebOffice.WebObj.Application.ActiveCell.FormulaR1C1 = "126";
webform.WebOffice.WebObj.Application.Range("C6").Select;
webform.WebOffice.WebObj.Application.ActiveCell.FormulaR1C1 = "446";
webform.WebOffice.WebObj.Application.Range("C7").Select;
webform.WebOffice.WebObj.Application.ActiveCell.FormulaR1C1 = "556";
webform.WebOffice.WebObj.Application.Range("C5:C8").Select;
webform.WebOffice.WebObj.Application.Range("C8").Activate;
webform.WebOffice.WebObj.Application.ActiveCell.FormulaR1C1 = "=SUM(R[-3]C:R[-1]C)";
webform.WebOffice.WebObj.Application.Range("D8").Select;
alert(webform.WebOffice.WebObj.Application.Range("C8").Text);
}
function WebInsertFile(){
webform.WebOffice.WebSetMsgByName("COMMAND","INSERTFILE");
webform.WebOffice.Template="模板一.doc";
if (webform.WebOffice.WebLoadTemplate()){
if (webform.WebOffice.WebInsertFile()){
alert("成功");
}else{
StatusMsg(webform.WebOffice.Status);
}
}else{
StatusMsg(webform.WebOffice.Status);
}
}
function WebUpdateFile(){
if (webform.WebOffice.WebUpdateFile()){
StatusMsg(webform.WebOffice.Status);
}else{
StatusMsg(webform.WebOffice.Status);
}
}
function WebInportText(){
var mText;
webform.WebOffice.WebSetMsgByName("COMMAND","INPORTTEXT");
if (webform.WebOffice.WebSendMessage()){
mText=webform.WebOffice.WebGetMsgByName("CONTENT");
webform.WebOffice.WebObject.Application.Selection.Range.InsertAfter(mText);
alert("导入文本成功");
}
StatusMsg(webform.WebOffice.Status);
}
function WebExportText(){
var mText=webform.WebOffice.WebObject.Content.Text;
webform.WebOffice.WebSetMsgByName("COMMAND","EXPORTTEXT");
webform.WebOffice.WebSetMsgByName("CONTENT",mText);
if (webform.WebOffice.WebSendMessage()){
alert("导出文本成功");
}
StatusMsg(webform.WebOffice.Status);
}
</script>
</HEAD>
<body bgcolor="#ffffff" onload="Load()" onunload="UnLoad()" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0" >
<form name="webform" method="post" action="DocumentSave.aspx" onsubmit="return SaveDocument();">
<input type=hidden name=RecordID value="<%=mRecordID%>">
<input type=hidden name=Template value="<%=mTemplate%>">
<input type=hidden name=FileType value="<%=mFileType%>">
<input type=hidden name=EditType value="<%=mEditType%>">
<input type=hidden name=HTMLPath value="<%=mHTMLPath%>">
<input type=hidden name="Subject" value ="<%=mSubject%>">
<input type=hidden name ="Author" value ="<%=mAuthor%>">
<input type=hidden name ="FileDate" value ="<%=mFileDate%>">
<table border=1 cellpadding=0 cellspacing =0 width=100% height=100% align=center class=TBStyle>
<tr width=100% height=100% valign =top >
<td align=left valign=top class="TDTitleStyle" id ="pftd" width=55 height=100% >
<!-- <asp:Panel id="Panel1" runat="server">-->
<span id="hiddeltd" style ="display:''">
<br>功能列表<br>
<input type=button class=buttonqsq size="8" name="Revision" value="隐藏痕迹" <%=mDisabled%> onclick="ShowRevision(this)"><br>
<input type=button class=buttonqsq value="签名印章" <%=mDisabled%> onclick="WebOpenSignature()"><br>
<!--<input type=button class=buttonqs value="添加签名印章" <%=mDisabled%> onclick="webform.WebOffice.WebNewSignaTrue()"><br>-->
<input type=button class=buttonqsq value="显示签名" <%=mDisabled%> onclick="WebShowSignature()"><br>
<input type=button class=buttonqsq value="验证签名" <%=mDisabled%> onclick="WebCheckSignature()"><br>
<input type=button class=buttonqsq value="隐藏签名" <%=mDisabled%> onclick="WebHideSignature()"><br>
<input type=button class=buttonqsq value="删除签名" <%=mDisabled%> onclick="webform.WebOffice.WebDelSignature();"><br>
<input type=button class=buttonqsq value="保存版本" <%=mDisabled%> onclick="WebSaveVersion()"><br>
<input type=button class=buttonqsq value="打开版本" <%=mDisabled%> onclick="WebOpenVersion()"><br>
<input type=button class=buttonqsq value="刷新文档" <%=mDisabled%> onclick="WebFocus()"><br>
<input type=button class=buttonqsq value="页面设置" <%=mDisabled%> onclick="WebOpenPageSetup()"><br>
<input type=button class=buttonqsq value="打印文档" <%=mDisabled%> onclick="WebOpenPrint()"><br>
<input type=button class=buttonqsq value="插入图片" <%=mDisabled%> onclick="WebOpenPicture()"><br>
<input type=button class=buttonqsq value="重调文档" <%=mDisabled%> onclick="LoadDocument()"><br>
<input type=button class=buttonqs value="打开本地文件" <%=mDisabled%> onclick="WebOpenLocal()"><br>
<input type=button class=buttonqs value="存为本地文件" <%=mDisabled%> onclick="WebSaveLocal()">
工具栏
<input type=button class=buttonqs value="关闭常用工具" <%=mDisabled%> onclick="WebToolsVisible('Standard',false)"><br>
<input type=button class=buttonqs value="打开常用工具" <%=mDisabled%> onclick="WebToolsVisible('Standard',true)"><br>
<input type=button class=buttonqs value="关闭格式工具" <%=mDisabled%> onclick="WebToolsVisible('Formatting',false)"><br>
<input type=button class=buttonqs value="打开格式工具" <%=mDisabled%> onclick="WebToolsVisible('Formatting',true)"><br>
<input type=button class=buttonqs value="关闭审阅按钮" <%=mDisabled%> onclick="WebToolsVisible('Reviewing',false)"><br>
<input type=button class=buttonqs value="打开审阅按钮" <%=mDisabled%> onclick="WebToolsVisible('Reviewing',true)"><br>
<input type=button class=buttonqs value="关闭打印按钮" <%=mDisabled%> onclick="WebToolsEnable('Standard',5,false);"><br>
<input type=button class=buttonqs value="打开打印按钮" <%=mDisabled%> onclick="WebToolsEnable('Standard',5,true);"><br>
其他调用
<input type=button class=buttonqsq value="插入页眉" <%=mDisabled%> <%=mWord%> onclick="webform.WebOffice.WebObj.ActiveWindow.ActivePane.View.SeekView=9;"><br>
<input type=button class=buttonqsq value="插入页码" <%=mDisabled%> <%=mWord%> onclick="webform.WebOffice.WebDialogs(294);"><br>
<input type=button class=buttonqsq value="插入字符" <%=mDisabled%> <%=mWord%> onclick="webform.WebOffice.WebDialogs(162);"><br>
<input type=button class=buttonqsq value="插入目录" <%=mDisabled%> <%=mWord%> onclick="webform.WebOffice.WebDialogs(171);"><br>
<input type=button class=buttonqsq value="插入表格" <%=mDisabled%> <%=mWord%> onclick="webform.WebOffice.WebDialogs(129);"><br>
<!-- </asp:Panel> -->
</span>
</td>
<td class="TDStyle" height=100% >
<table border=0 cellspacing='0' cellpadding='0' width='100%' height=100% >
<tr>
<td bgcolor=menu >
<OBJECT height="100%" width="100%" classid=clsid:3010A4BD-B471-4146-95D8-4927D5C5C79F codebase="../FairyWebOfficeOcx.ocx" name=WebOffice VIEWASTEXT>
<PARAM NAME="Visible" VALUE="0">
<PARAM NAME="AutoScroll" VALUE="0">
<PARAM NAME="AutoSize" VALUE="0">
<PARAM NAME="AxBorderStyle" VALUE="1">
<PARAM NAME="Caption" VALUE="FairyWebOffice">
<PARAM NAME="Color" VALUE="2147483663">
<PARAM NAME="Font" VALUE="MS Sans Serif">
<PARAM NAME="KeyPreview" VALUE="0">
<PARAM NAME="PixelsPerInch" VALUE="96">
<PARAM NAME="PrintScale" VALUE="1">
<PARAM NAME="Scaled" VALUE="-1">
<PARAM NAME="DropTarget" VALUE="0">
<PARAM NAME="HelpFile" VALUE="">
<PARAM NAME="DoubleBuffered" VALUE="0">
<PARAM NAME="Enabled" VALUE="-1">
<PARAM NAME="Cursor" VALUE="0">
<PARAM NAME="HelpType" VALUE="0">
<PARAM NAME="HelpKeyword" VALUE="">
<PARAM NAME="ServerPath" VALUE="">
<PARAM NAME="RecordID" VALUE="">
<PARAM NAME="Template" VALUE="">
<PARAM NAME="FileName" VALUE="">
<PARAM NAME="FileType" VALUE="">
<PARAM NAME="EditType" VALUE="0">
<PARAM NAME="UserName" VALUE="">
<PARAM NAME="Model" VALUE="0">
<PARAM NAME="Status" VALUE="">
</OBJECT>
</td>
</tr>
<tr>
<td bgcolor=menu height='20'>
<div id=StatusBar>状态栏</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table align=center>
<tr>
<td>
<input type=button value="隐藏工具栏" id="hiddenjob" class =input onclick =changeTable()>
<input type=submit value=" 保存 " class =input <%=mDisabled%> >
<input type=button value=" 返回 " class =input onclick="history.back()"> 注意:只有选择《保存》后,所做的操作才有效!
</td>
</tr>
</table>
<div id="menu" style=" position:absolute;visibility:hidden;top:0px;left:8px;width:100%; height::20px; background-color::red">
<table id=table1 border="=0" cellpadding="0"; cellspacing="0">
<tr>
<td>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
<iframe src="javascript:false" style="position::absolute; visibility:inherit;top:0px;left:8px;width:100%;height:20px; z-index:-1; filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';">
</iframe>
</div>
</form>
</body>
</HTML>
<script language=javascript >
function changeTable()
{
if (webform.hiddenjob.value =="隐藏工具栏")
{
hiddeltd.style.display ='none';
pftd.width =1;
webform.hiddenjob.value ="显示工具栏";
}
else
{
hiddeltd.style.display ='';
pftd.width =55;
webform.hiddenjob.value ="隐藏工具栏";
}
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -