您的位置:程序门 -> vb -> 资源



如何用vb在word 中生成多个表格,尤其是在很多时 涉及到换页的操作时,


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


如何用vb在word 中生成多个表格,尤其是在很多时 涉及到换页的操作时,
发表于:2007-07-01 01:19:43 楼主
如何用vb在word   中生成多个表格,尤其是在很多时   涉及到换页的操作时,  
大家各我看看,我的邮箱是999999999liguang@.163.com   qq:26749732  
下面是我的代码   :  
for   n   =   1   to   6  
activedocument.tables.add   range:=selection.range,   numrows:=10+n,   numcolumns:=   _  
6,   defaulttablebehavior:=wdword9tablebehavior,   autofitbehavior:=   _  
wdautofitfixed  


with   wddoc.tables(n)  
.cell(1,   1).merge   .cell(1,   6)  
end   with  


with   selection.tables(1)  
if   .style   <>   "网格型 "   then  
.style   =   "网格型 "  
end   if  
.applystyleheadingrows   =   true  
.applystylelastrow   =   true  
.applystylefirstcolumn   =   true  
.applystylelastcolumn   =   true  
end   with  
activewindow.activepane.verticalpercentscrolled   =   45  
selection.movedown   unit:=wdline,   count:=10+n   +   1  

selection.typeparagraph  
next   n  


快速检索

最新资讯
热门点击