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

问题描述

嗨.

我有以下代码:

Hi.

I have this code:

 

昏暗 objWordApp As Word.Application
objWordApp =
新建 Word.Application

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

 

昏暗 objDoc 新建 Word.Document
objWordApp.Visible =
True 'IIf(chkShowWord.Checked,True,False)
objDoc = objWordApp.Documents.Add

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

 

使用 objDoc

昏暗
tblTable Word.Table
tblTable = objDoc.Tables.Add(objDoc.Bookmarks.Item(
"\ 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

结束 使用

如何插入分页符(插入新页面),然后在下一页继续表?

亲切的Peer Larsen

End With

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

Kindly Peer Larsen

推荐答案

>

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

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


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

09-17 22:16