打印本文 打印本文 关闭窗口 关闭窗口
iWebOffice2004调用VBA脚本解释及翻译
作者:武汉SEO闵涛  文章来源:敏韬网  点击数5568  更新时间:2009/4/23 18:59:01  文章录入:mintao  责任编辑:mintao
ice.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()">
    版本控制
                 <input type=button class=button value="保存版本" <%=mDisabled%> onclick="WebSaveVersion()">
                 <input type=button class=button value="打开版本" <%=mDisabled%> onclick="WebOpenVersion()">
    服务器交互
                 <input type=button class=button value="签名印章" <%=mDisabled%> onclick="WebOpenSignature()">
                 <input type=button class=button value="验证签章" <%=mDisabled%> onclick="WebShowSignature()">
                 <input type=button class=button value="远程图片" <%=mDisabled%> onclick="WebInsertImage(''''Image'''',''''样品.jpg'''',true,4);">
                 <input type=button class=button value="填充模版" <%=mDisabled%> <%=mWord%> onclick="LoadBookmarks()">
                 <input type=button class=button value="表格填充" <%=mDisabled%> <%=mWord%> onclick="WebSetWordTable()">

    VBA调用
                 <input type=button class=button value="取Word内容" <%=mDisabled%> <%=mWord%>  onclick="WebGetWordContent()">
                 <input type=button class=button value="写Word内容" <%=mDisabled%> <%=mWord%> onclick="WebSetWordContent()">
                 <input type=button class=button value="用Excel求和" <%=mDisabled%> <%=mExcel%> onclick="WebGetExcelContent()">
                 <input type=button class=button value="Excel保护工作表" <%=mDisabled%> <%=mExcel%> onclick="WebSheetsLock()">
      工具栏
                 <input type=button class=button value="关闭菜单" <%=mDisabled%>  onclick="WebMenuBar(false)">
                 <input type=button class=button value="显示菜单" <%=mDisabled%>  onclick="WebMenuBar(true)">
                 <input type=button class=button value="关闭工具栏" <%=mDisabled%>  onclick="WebToolBars(false)">
                 <input type=button class=button value="显示工具栏" <%=mDisabled%>  onclick="WebToolBars(true)">
                 <input type=button class=button value="关闭常用工具" <%=mDisabled%>  onclick="WebToolsVisible(''''Standard'''',false)">
                 <input type=button class=button value="打开常用工具" <%=mDisabled%>  onclick="WebToolsVisible(''''Standard'''',true)">
                 <input type=button class=button value="关闭格式工具" <%=mDisabled%>  onclick="WebToolsVisible(''''Formatting'''',false)">
                 <input type=button class=button value="打开格式工具" <%=mDisabled%>  onclick="WebToolsVisible(''''Formatting'''',true)">
                 <input type=button class=button value="关闭审阅按钮" <%=mDisabled%>  onclick="WebToolsVisible(''''Reviewing'''',false)">
                 <input type=button class=button value="打开审阅按钮" <%=mDisabled%>  onclick="WebToolsVisible(''''Reviewing'''',true)">
                 <input type=button class=button value="关闭打印按钮" <%=mDisabled%>  onclick="WebToolsEnable(''''Standard'''',2521,false);">
                 <input type=button class=button value="打开打印按钮" <%=mDisabled%>  onclick="WebToolsEnable(''''Standard'''',2521,true);">
    其他调用
                 <input type=button class=button value="VBA套红定稿" <%=mDisabled%> <%=mWord%> onclick="WebInsertVBA();">
                 <input type=button class=button value="套用模版定稿" <%=mDisabled%> onclick="WebInsertFile()">
                 <input type=button class=button value=

上一页  [1] [2] [3] [4] [5] [6] [7]  下一页

打印本文 打印本文 关闭窗口 关闭窗口