Bookmark.TwoLinesInOne Property


Gets or sets a value that indicates whether Microsoft Office Word sets two lines of text in one and specifies the characters, if any, that enclose the text in a Bookmark control.

Namespace:   Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

WdTwoLinesInOneType TwoLinesInOne { get; set; }

Setting the P:Microsoft.Office.Interop.Word.Range.TwoLinesInOne property to wdTwoLinesInOneNoBrackets sets two lines of text in one without enclosing the text in any characters. Setting the TwoLinesInOne property to wdTwoLinesInOneNone restores a line of combined text to two separate lines.

The following code example adds a Bookmark control with text to the document and then sets the TwoLinesInOne property to wdTwoLinesInOneCurlyBrackets.

This example is for a document-level customization.

private void BookmarkTwoLinesInOne()

    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
    bookmark1.Text = "This is sample bookmark text.";

    bookmark1.TwoLinesInOne = 
Return to top