var aa = "我的列标题"
var TableRange; //以下为给表格中的单元格赋值
for (i= 0;i<7;i++)
{
with (myTable.Cell(1,i+1).Range)
{
font.Size = 12;
InsertAfter(aa);
ColumnWidth =4
}
}
for (i =0;i<7;i++)
{
for (n =0;n<7 ;n++)
{
with (myTable.Cell(i+2,n+1).Range)
{font.Size = 12;
InsertAfter("bbbb");
}
}
}
row_count = 0;
col_count = 0
myDoc.Protect(1)
}
wordcontorl()
</script>
*******************************************************************************
********************
3.遍历导出到 word
*******************************************************************************
********************
1、遍历导出每个文本框内的内容。
<script language="javascript">
function OpenWord(){//导出 word
var txt="txt";
for(i=0;i<table1.rows.length;i++)//遍历导出图表和文字
{
txt="txt"+jilu[i];
myRange =mydoc.Range(myRange.End-1,myRange.End);//设定起始点
var sel=Layer1.document.body.createTextRange();