---
title: "reopenDocumentForURL:withContentsOfURL:error:"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsdocumentcontroller/reopendocumentforurl:withcontentsofurl:error:"
---

# reopenDocumentForURL:withContentsOfURL:error:

Reopens an autosaved document located by a URL, by reading the contents for the document from another URL, presents its user interface, and returns true if successful.

## Declaration

```occ
- (BOOL) reopenDocumentForURL:(NSURL *) url withContentsOfURL:(NSURL *) contentsURL error:(NSError **) outError;
```

## Discussion

Discussion The document is located by absoluteDocumentURL and the contents are read from absoluteDocumentContentsURL. If not  successful, the method returns false after setting outError to point to an NSError object that encapsulates the reason why the document could not be reopened.

## See Also

### Deprecated Methods

- [documentForFileName:](appkit/nsdocumentcontroller/documentforfilename:.md)
- [fileExtensionsFromType:](appkit/nsdocumentcontroller/fileextensionsfromtype:.md)
- [fileNamesFromRunningOpenPanel](appkit/nsdocumentcontroller/filenamesfromrunningopenpanel.md)
- [makeUntitledDocumentOfType:](appkit/nsdocumentcontroller/makeuntitleddocumentoftype:.md)
- [makeDocumentWithContentsOfURL:ofType:](appkit/nsdocumentcontroller/makedocumentwithcontentsofurl:oftype:.md)
- [makeDocumentWithContentsOfFile:ofType:](appkit/nsdocumentcontroller/makedocumentwithcontentsoffile:oftype:.md)
- [openDocumentWithContentsOfFile:display:](appkit/nsdocumentcontroller/opendocumentwithcontentsoffile:display:.md)
- [openDocumentWithContentsOfURL:display:](appkit/nsdocumentcontroller/opendocumentwithcontentsofurl:display:.md)
- [openDocumentWithContentsOfURL:display:error:](appkit/nsdocumentcontroller/opendocumentwithcontentsofurl:display:error:.md)
- [openUntitledDocumentOfType:display:](appkit/nsdocumentcontroller/openuntitleddocumentoftype:display:.md)
- [setShouldCreateUI:](appkit/nsdocumentcontroller/setshouldcreateui:.md)
- [shouldCreateUI](appkit/nsdocumentcontroller/shouldcreateui.md)
- [typeFromFileExtension:](appkit/nsdocumentcontroller/typefromfileextension:.md)
