---
title: uniqueSpellDocumentTag()
framework: appkit
role: symbol
role_heading: Type Method
path: appkit/nsspellchecker/uniquespelldocumenttag()
---

# uniqueSpellDocumentTag()

Returns a guaranteed unique tag to use as the spell-document tag for a document.

## Declaration

```swift
class func uniqueSpellDocumentTag() -> Int
```

## Return Value

Return Value Returns a unique tag to identified this spell checked object.

## Discussion

Discussion Use this method to generate tags to avoid collisions with other objects that can be spell checked.

## See Also

### Managing the Spell-Checking Process

- [closeSpellDocument(withTag:)](appkit/nsspellchecker/closespelldocument(withtag:).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)
