0

我有以下 VB.Net 代码来创建 Microsoft Word 文档。如何强制“第二段”。在下一页(新页面)?

Imports Word = Microsoft.Office.Interop.Word

Dim wordApp As Word._Application = New  _
    Word.ApplicationClass()

    Dim wordDoc As Word._Document = _
        wordApp.Documents.Add()

    Dim para As Word.Paragraph = wordDoc.Paragraphs.Add()
    para.Range.Text = "First Paragraph."
    para.Range.InsertParagraphAfter()

    para.Range.Text = "Second Paragraph."
    para.Range.InsertParagraphAfter()
4

1 回答 1

2

您可以使用 InsertBreak 开始一个新页面:

  Selection.InsertBreak

WdBreakType 枚举

于 2012-09-11T13:31:40.620 回答