问题描述
嗨. Hi. 昏暗 objWordApp As Word.Application Dim objWordApp As Word.Application 昏暗 objDoc 如 新建 Word.Document Dim objDoc As New Word.Document 使用 objDoc With objDoc 昏暗 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 下一步 tblTable.Borders.InsideLineStyle = Word.WdLineStyle.wdLineStyleSingle tblTable.Borders.InsideLineStyle = Word.WdLineStyle.wdLineStyleSingle 结束 使用 End With > 本文中的示例代码演示了如何插入表和插入分页符. The sample code in this article demonstrates how to insert tables and insert page break. 最诚挚的问候, Best regards, 这篇关于如何在表格中插入分页符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
我有以下代码:
I have this code:
objWordApp = 新建 Word.Application
objWordApp = New Word.Application
objWordApp.Visible = True 'IIf(chkShowWord.Checked,True,False)
objDoc = objWordApp.Documents.Add
objWordApp.Visible = True 'IIf(chkShowWord.Checked, True, False)
objDoc = objWordApp.Documents.Add
昏暗 tblTable 如 Word.Table
tblTable = objDoc.Tables.Add(objDoc.Bookmarks.Item( "\ endofdoc" ).范围,5, 2)
Dim tblTable As Word.Table
tblTable = objDoc.Tables.Add(objDoc.Bookmarks.Item("\endofdoc").Range, 5, 2)
''插入新页面,并在新页面上继续表格
结束 如果
'Insert a new page, and continue table on new page
End If
tblTable.Borders.OutsideLineStyle = Word.WdLineStyle.wdLineStyleSingle
tblTable.Borders.OutsideLineStyle = Word.WdLineStyle.wdLineStyleSingle
如何插入分页符(插入新页面),然后在下一页继续表?
亲切的Peer Larsen
How do i insert the pagebreak (insert a new page), and then continue table on the next page?
Kindly Peer Larsen推荐答案
您可以使用并研究该代码示例以弄清您的问题.
You can play with and investigate the code sample to figure out your question.
谢马丁(Martin Xie)
Martin Xie