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

# updateSpellingPanel(withMisspelledWord:)

Causes the spell checker to update the Spelling panel’s misspelled-word field to reflect `word`.

```
func updateSpellingPanel(withMisspelledWord word: String)
```

## Discussion

You are responsible for highlighting `word` in the document and for extracting it from the document using the range returned by the `checkSpelling:...` methods. Pass the empty string as `word` to have the system beep, indicating no misspelled words were found.

---

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)