---
title: selectedTextSearchDocument
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uitextsearching-3wkjv/selectedtextsearchdocument
---

# selectedTextSearchDocument

The object that uniquely identifies the specific document with selected text.

## Declaration

```swift
var selectedTextSearchDocument: Self.DocumentIdentifier? { get }
```

## Discussion

Discussion When performing a search across multiple documents, this object returns the identifier for the document with the selected text. When performing a search on a single document, it returns nil.

## See Also

### Identifying selected text

- [selectedTextRange](uikit/uitextsearching-3wkjv/selectedtextrange.md)
