iWebOffice2004调用VBA脚本解释及翻译[11]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 csdnhome 的 blog

  webform.weboffice.websetmsgbyname("command","wordtable");   //officeserver.asp  command=wordtable
  //发送到服务器上
  webform.weboffice.websendmessage();         //officeserver.asp  option=sendmessage
  //如果没有错误
  if (webform.weboffice.error==""){                      
 //取得列
 icolumns = webform.weboffice.webgetmsgbyname("columns");
 //取得行
 icells = webform.weboffice.webgetmsgbyname("cells");     
 //生成表格
 itable=webform.weboffice.activedocument.tables.add(webform.weboffice.activedocument.application.selection.range,icells,icolumns);  
 for (var i=1; i<=icolumns; i++)
 {
      for (var j=1; j<=icells; j++)
   {
  mname=i.tostring()+j.tostring();  
  //取得表格内容 
  mtext=webform.weboffice.webgetmsgbyname(mname); 
  //填充单元值
  itable.columns(i).cells(j).range.text=mtext;    
    }
 }
   }
   statusmsg(webform.weboffice.status);
}

</script>
</head>
<body bgcolor="#ffffff" onload="load()" onunload="unload()">

<form name="webform" method="post" action="documentsave.asp" 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%>">

<table border=0  cellspacing='0' cellpadding='0' width=100% height=100% align=center class=tbstyle>
<tr>
  <td align=right class="tdtitlestyle" width=64>主题</td>
  <td class="tdstyle"><input type=text name=subject value="<%=msubject%>" class="iptstyle" onblur="setbookmarks('caption',this.value);" ></td>
</tr>

<tr>
  <td align=right class="tdtitlestyle" width=64>作者</td>
  <td class="tdstyle"><input type=text name=author value="<%=mauthor%>" class="iptstyle" onblur="setbookmarks('author',this.value);" ></td>
</tr>

<tr>
  <td align=right class="tdtitlestyle" width=64>时间</td>
  <td class="tdstyle"><input type=text name=filedate value="<%=mfiledate%>" readonly class="iptstyle" ></td>
</tr>
<tr>
  <!--td align=right valign=top  class="tdtitlestyle" width=64>内容</td-->
  <td align=right valign=top  class="tdtitlestyle" width=64 hegith=90% >
  <br>功能列表<br>
                 <input type=button class=button value="隐藏痕迹" <%=mdisabled%> <%=mword%> onclick="showrevision(false)">
                 <input type=button class=button value="显示痕迹" <%=mdisabled%> <%=mword%> onclick="showrevision(true)">
                 <input type=button class=button value="清除痕迹" <%=mdisabled%> <%=mword%> onclick="webform.weboffice.activedocument.acceptallrevisions();">
                 <input type=button class=button value="保护文档" <%=mdisabled%> onclick="webprotect(true)">
                 <input type=button class=button value="解除保护" <%=mdisabled%> onclick="webprotect(false)">
                 <input type=button class=button value="页面设置" <%=mdisabled%> onclick="webopenpagesetup()">
                 <input type=button class=button value="打印文档" <%=mdisabled%> onclick="webopenprint()">
                 <input type=button class=button value="插入图片" <%=mdisabled%> onclick="webopenpicture()">
    版本控制

本文关键:Office VBA 痕迹保留 手写签名 电子印章
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top