Expand Minimize

Bookmark.LanguageID Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets or sets the language for the Bookmark control.

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

WdLanguageID LanguageID { get; set; }

Property Value

Type: Microsoft.Office.Interop.Word.WdLanguageID
One of the WdLanguageID values.

For a custom dictionary, you must first set the LanguageSpecific property to true before specifying the LanguageID property. Custom dictionaries that are language specific only look at text formatted for that language.

The following code example adds a Bookmark control to the document and then applies formatting to the bookmark based on the LanguageID of the text within the bookmark.

This example is for a document-level customization.

private void BookmarkBiDi()
    Microsoft.Office.Tools.Word.Bookmark bookmark1 =

    int WordTrue = 1;
    if (bookmark1.LanguageID == Word.WdLanguageID.wdArabic || 
        bookmark1.LanguageID == Word.WdLanguageID.wdHebrew)
        bookmark1.BoldBi = WordTrue;
        bookmark1.ItalicBi = WordTrue;
        bookmark1.Bold = WordTrue;
        bookmark1.Italic = WordTrue;

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft