繁体中文
设为首页
加入收藏
当前位置:ASP技术首页 >> ASP基础 >> 关于buildDoc函数的一点改进,增强分页打印效果

关于buildDoc函数的一点改进,增强分页打印效果

2005-12-15 08:00:00  作者:  来源:互联网  浏览次数:0  文字大小:【】【】【
简介:本文首发于我的Blog:http://nice90.blogone.net http://www.blogcn.com/user2/nice90/main.asp?id=1657409 buildDoc函数在网络上很出名了,这个函数是将web页面中某个Table的内容全部导入到Word文档中进行分页打...

本文首发于我的Blog:http://nice90.blogone.net

http://www.blogcn.com/user2/nice90/main.asp?id=1657409

buildDoc函数在网络上很出名了,这个函数是将web页面中某个Table的内容全部导入到Word文档中进行分页打印。但是有一个缺陷是原来的buildDoc程序生成的Table在打印的时候不会打印出来Table的Border。于是我将该程序进行了修改,使得打印的时候能够打印出来黑色的Border。主要是在程序中加入了下面两句:

以下内容为程序代码:

objWordDoc.Application.ActiveDocument.Tables(1).Borders.InsideLineStyle = True

objWordDoc.Application.ActiveDocument.Tables(1).Borders.OutsideLineStyle = True

完整的程序如下:toWord.htm

Build Document by Script

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/office97/html/output/F1/D4/S5AB0B.asp


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/office97/html/output/F1/D4/S5AC00.asp


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/office97/html/output/F1/D4/S5A856.asp


参考资料:

a.http://msdn.microsoft.com/library/default.asp?url=/library/en-us/office97/html/output/F1/D4/S5AB0B.asp

b.http://msdn.microsoft.com/library/default.asp?url=/library/en-us/office97/html/output/F1/D4/S5AC00.asp

c.http://msdn.microsoft.com/library/default.asp?url=/library/en-us/office97/html/output/F1/D4/S5A856.asp

产品名称 产品描述 产品单价 产品等级
产品一 This is a test 300.50 一级
产品二 This is a test 300.50 一级
产品三 This is a test 300.50 一级
产品一 This is a test 300.50 一级
产品二 This is a test 300.50 一级
产品三 This is a test 300.50 一级
产品一 This is a test 300.50 一级
产品二 This is a test 300.50 一级
产品三 This is a test 300.50 一级
产品一 This is a test 300.50 一级
产品二 This is a test 300.50 一级
产品三 This is a test 300.50 一级
产品一 This is a test 300.50 一级
产品二 This is a test 300.50 一级
产品三 This is a test 300.50 一级
产品一 This is a test 300.50 一级
产品二 This is a test 300.50 一级
产品三 This is a test 300.50 一级

责任编辑:admin
相关文章