如何在表格中插入分页符 [英] How to insert a page break in a table

查看:140
本文介绍了如何在表格中插入分页符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.

我有以下代码:

Hi.

I have this code:

 

昏暗 objWordApp Word.Application
objWordApp =
新建

Dim objWordApp As Word.Application
objWordApp =
New Word.Application

 

昏暗 objDoc 新建 True objDoc = objWordApp.Documents.Add

Dim objDoc As New Word.Document
objWordApp.Visible =
True 'IIf(chkShowWord.Checked, True, False)
objDoc = objWordApp.Documents.Add

 

使用 objDoc
tblTable "\ endofdoc" ).范围,5, 2)

With objDoc

Dim
tblTable As Word.Table
tblTable = objDoc.Tables.Add(objDoc.Bookmarks.Item(
"\endofdoc").Range, 5, 2)

 

昏暗 intLinie Int16 = 8

Dim intLinie As Int16 = 8

 

对于 a = 0 5

tblTable.Cell(a + 1,1).Range.Text =

For a = 0 To 5

     tblTable.Cell(a + 1, 1).Range.Text =

如果 a = 3 如果

     If a = 3 Then
        'Insert a new page, and continue table on new page
     End If

下一步

tblTable.Borders.InsideLineStyle = Word.WdLineStyle.wdLineStyleSingle
tblTable.Borders.OutsideLineStyle = Word.WdLineStyle.wdLineStyleSingle

tblTable.Borders.InsideLineStyle = Word.WdLineStyle.wdLineStyleSingle
tblTable.Borders.OutsideLineStyle = Word.WdLineStyle.wdLineStyleSingle

结束

End With

How do i insert the pagebreak (insert a new page), and then continue table on the next page?

Kindly Peer Larsen

推荐答案

http://support.microsoft.com/kb/316383

>

本文中的示例代码演示了如何插入表和插入分页符.
您可以使用并研究该代码示例以弄清您的问题.

The sample code in this article demonstrates how to insert  tables and insert page break.
You can play with and investigate the code sample to figure out your question.

最诚挚的问候,
谢马丁(Martin Xie)

Best regards,
Martin Xie


这篇关于如何在表格中插入分页符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆