Share via


Bookmark.TwoLinesInOne Property (2007 System)

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.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public Property TwoLinesInOne As WdTwoLinesInOneType
'Usage
Dim instance As Bookmark 
Dim value As WdTwoLinesInOneType 

value = instance.TwoLinesInOne

instance.TwoLinesInOne = value
[BrowsableAttribute(false)]
public WdTwoLinesInOneType TwoLinesInOne { get; set; }
[BrowsableAttribute(false)]
public:
property WdTwoLinesInOneType TwoLinesInOne {
    WdTwoLinesInOneType get ();
    void set (WdTwoLinesInOneType value);
}
public function get TwoLinesInOne () : WdTwoLinesInOneType 
public function set TwoLinesInOne (value : WdTwoLinesInOneType)

Property Value

Type: WdTwoLinesInOneType
One of the WdTwoLinesInOneType values.

Remarks

Setting the 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.

Examples

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 Sub BookmarkTwoLinesInOne()

    Me.Paragraphs(1).Range.InsertParagraphBefore()

    Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
        Me.Controls.AddBookmark(Me.Paragraphs(1).Range, "Bookmark1")
    Bookmark1.Text = "This is sample bookmark text."
    Bookmark1.TwoLinesInOne = Word.WdTwoLinesInOneType. _
        wdTwoLinesInOneCurlyBrackets

End Sub
private void BookmarkTwoLinesInOne()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();

    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
        this.Controls.AddBookmark(this.Paragraphs[1].Range,
        "bookmark1");
    bookmark1.Text = "This is sample bookmark text.";

    bookmark1.TwoLinesInOne = 
        Word.WdTwoLinesInOneType.wdTwoLinesInOneCurlyBrackets;
}

.NET Framework Security

See Also

Reference

Bookmark Class

Bookmark Members

Microsoft.Office.Tools.Word Namespace