Aracılığıyla paylaş


Bookmark.NoProofing Property

Definition

Gets or set a value that indicates whether the spelling and grammar checker ignores the text in the Bookmark control.

public:
 property int NoProofing { int get(); void set(int value); };
public int NoProofing { get; set; }
member this.NoProofing : int with get, set
Public Property NoProofing As Integer

Property Value

0 if the spelling and grammar checker does not ignore the text in the Bookmark control; 1 if the spelling and grammar checker ignores the text in the Bookmark control; wdUndefined if the spelling and grammar checker ignores only some of the text in the Bookmark control.

Examples

The following code example adds a Bookmark control with misspelled text to the first paragraph, and sets the NoProofing property of the bookmark to true. When the document is checked for spelling errors, the misspelled text within the bookmark is ignored.

This example is for a document-level customization.

private void BookmarkNoProofing()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();

    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
        this.Controls.AddBookmark(this.Paragraphs[1].Range,
        "bookmark1");
    int WordTrue = 1;
    bookmark1.Text = "This bookmark contains a mispellling.";
    bookmark1.InsertAfter(" This text also contains a mispelling.");
    bookmark1.NoProofing = WordTrue;

    object IgnoreUppercase = true;
    object AlwaysSuggest = true;
    
    this.CheckSpelling(ref missing, ref IgnoreUppercase,
        ref AlwaysSuggest, ref missing, ref missing, ref missing,
        ref missing, ref missing, ref missing, ref missing,
        ref missing, ref missing);
}
Private Sub BookmarkNoProofing()

    Me.Paragraphs(1).Range.InsertParagraphBefore()
    Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
        Me.Controls.AddBookmark(Me.Paragraphs(1).Range, "Bookmark1")

    Bookmark1.Text = "This bookmark contains a mispellling."
    Bookmark1.InsertAfter(" This text also contains a mispelling.")
    Bookmark1.NoProofing = True

    Me.CheckSpelling(IgnoreUppercase:=True, AlwaysSuggest:=True)

End Sub

Applies to