---
title: "closeSpellDocument(withTag:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsspellchecker/closespelldocument(withtag:)"
---

# closeSpellDocument(withTag:)

Notifies the receiver that the user has finished with the tagged document.

## Declaration

```swift
func closeSpellDocument(withTag tag: Int)
```

## Discussion

Discussion The spell checker will release any resources associated with the document, including but not necessarily limited to, ignored words.

## See Also

### Managing the Spell-Checking Process

- [uniqueSpellDocumentTag()](appkit/nsspellchecker/uniquespelldocumenttag().md)
- [ignoreWord(_:inSpellDocumentWithTag:)](appkit/nsspellchecker/ignoreword(_:inspelldocumentwithtag:).md)
- [ignoredWords(inSpellDocumentWithTag:)](appkit/nsspellchecker/ignoredwords(inspelldocumentwithtag:).md)
- [setIgnoredWords(_:inSpellDocumentWithTag:)](appkit/nsspellchecker/setignoredwords(_:inspelldocumentwithtag:).md)
- [setWordFieldStringValue(_:)](appkit/nsspellchecker/setwordfieldstringvalue(_:).md)
- [updateSpellingPanel(withMisspelledWord:)](appkit/nsspellchecker/updatespellingpanel(withmisspelledword:).md)
- [completions(forPartialWordRange:in:language:inSpellDocumentWithTag:)](appkit/nsspellchecker/completions(forpartialwordrange:in:language:inspelldocumentwithtag:).md)
- [hasLearnedWord(_:)](appkit/nsspellchecker/haslearnedword(_:).md)
- [unlearnWord(_:)](appkit/nsspellchecker/unlearnword(_:).md)
- [learnWord(_:)](appkit/nsspellchecker/learnword(_:).md)
- [userQuotesArray(forLanguage:)](appkit/nsspellchecker/userquotesarray(forlanguage:).md)
- [userReplacementsDictionary](appkit/nsspellchecker/userreplacementsdictionary.md)
