Paragraphs.KeepTogether Property
Determines if all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document.
Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in microsoft.office.interop.word.dll)
Usage
Dim paragraphs1 As Paragraphs
Dim returnValue As Integer
returnValue = paragraphs1.KeepTogether
Dim sampleValue As Integer
paragraphs1.KeepTogether = sampleValue
Syntax
Property KeepTogether() As Integer
int KeepTogether {get; set;}
property Int32 KeepTogether{
Int32 get();
Void set(Int32);
}
public int get_KeepTogether();
public void set_KeepTogether(int);
function get KeepTogether() : int;
function set KeepTogether(int);
Remarks
This property returns True if all lines in the specified paragraphs remain on the same page when Word repaginates the document, and False if not. Set the property value to True or False to enable or disable the functionality.
Possible values are True, False, and wdUndefined.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000
Target Platforms
See Also
Reference
Paragraphs Interface
Microsoft.Office.Interop.Word Namespace