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

# noteNewRecentDocument(_:)

Adds or replaces an Open Recent menu item corresponding to the document.

```
func noteNewRecentDocument(_ document: NSDocument)
```

## Parameters

`document`

The document to evaluate.

## Discussion

This method constructs a URL and calls [`noteNewRecentDocumentURL(_:)`](/documentation/AppKit/NSDocumentController/noteNewRecentDocumentURL(_:)). Subclasses might override this method to prevent certain documents or kinds of documents from getting into the list.

---

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)