共用方式為


Publisher (的 ParagraphFormat.KeepWithNext 屬性)

會設定或傳回 MsoTriState 常數,指出下列段落是否會保留在與指定段落相同的文字方塊中。 讀取/寫入。

語法

運算式KeepWithNext

表達 代表 ParagraphFormat 物件的 變數。

傳回值

MsoTriState

註解

KeepWithNext的目的是要防止檔中的行標題。 若要這樣做,您可以將所有標題的這個屬性設定為 msoTrue

此屬性的預設設定為 msoFalse

範例

本範例會將 KeepWithNext 屬性設定為 msoTrue 所指定的 ParagraphFormat 物件。

Dim objParaForm As ParagraphFormat 
Set objParaForm = ActiveDocument.Pages(1).Shapes(1) _ 
 .TextFrame.TextRange.Paragraphs(1).ParagraphFormat 
objParaForm.KeepWithNext = msoTrue

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應