Ms word 如何使用MS Word设置段落列计数

Ms word 如何使用MS Word设置段落列计数,ms-word,multiple-columns,Ms Word,Multiple Columns,我只想在下面的代码中设置最后的段落列: wordDoc.parages.Last.Range.PageSetup.TextColumns.SetCount(3) 但它将页面设置为3列 那么,什么代码可以设置最后的段落列呢?没有段落列属性,只有页面列属性(TextColumns)。如果要限制TextColumns的范围,请在相关段落的前面(和后面,如果适用)插入分节符。例如: Sub Demo() Dim wordDoc As Document Set wordDoc = ActiveDocume

我只想在下面的代码中设置最后的段落列:

wordDoc.parages.Last.Range.PageSetup.TextColumns.SetCount(3)

但它将页面设置为3列


那么,什么代码可以设置最后的段落列呢?

没有段落列属性,只有页面列属性(TextColumns)。如果要限制TextColumns的范围,请在相关段落的前面(和后面,如果适用)插入分节符。例如:

Sub Demo()
Dim wordDoc As Document
Set wordDoc = ActiveDocument
With wordDoc.Paragraphs.Last.Range
  .InsertBreak Type:=wdSectionBreakContinuous
  .PageSetup.TextColumns.SetCount (3)
End With
End Sub

谢谢你的回答。我是微软Word的新手,你能给我一个使用分节符的代码吗?@yehen-这是一个微不足道的任务-看看我的最新答案。