<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSpellChecker/ignoreWord(_:inSpellDocumentWithTag:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSSpellChecker(im)ignoreWord:inSpellDocumentWithTag:"
  },
  "title" : "ignoreWord(_:inSpellDocumentWithTag:)"
}
-->

# ignoreWord(_:inSpellDocumentWithTag:)

Instructs the spell checker to ignore all future occurrences of `wordToIgnore` in the document identified by `tag`.

```
func ignoreWord(_ wordToIgnore: String, inSpellDocumentWithTag tag: Int)
```

## Discussion

You should invoke this method from within your implementation of the NSIgnoreMisspelledWords protocol’s [`ignoreSpelling(_:)`](/documentation/AppKit/NSIgnoreMisspelledWords/ignoreSpelling(_:)) method.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)