---
title: "selectionForWord(at:)"
framework: pdfkit
role: symbol
role_heading: Instance Method
path: "pdfkit/pdfpage/selectionforword(at:)"
---

# selectionForWord(at:)

Returns the whole word that includes the specified point.

## Declaration

```swift
func selectionForWord(at point: CGPoint) -> PDFSelection?
```

```swift
func selectionForWord(at point: NSPoint) -> PDFSelection?
```

## Discussion

Discussion Returns NULL if no word contains point. Use this method to respond to a double-click.

## See Also

### Working with Selections

- [selection(for:)](pdfkit/pdfpage/selection(for:)-2ckpi.md)
- [selectionForLine(at:)](pdfkit/pdfpage/selectionforline(at:).md)
- [selection(from:to:)](pdfkit/pdfpage/selection(from:to:).md)
- [selection(for:)](pdfkit/pdfpage/selection(for:)-20y9d.md)
