---
title: "application(_:openFileWithoutUI:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsapplicationdelegate/application(_:openfilewithoutui:)"
---

# application(_:openFileWithoutUI:)

Returns a Boolean value that indicates if the app opens the specified file without showing its user interface.

## Declaration

```swift
@MainActor optional func application(_ sender: Any, openFileWithoutUI filename: String) -> Bool
```

## Parameters

- `sender`: The object that sent the command.
- `filename`: The name of the file to open.

## Return Value

Return Value true if the file was successfully opened or false if it was not.

## Discussion

Discussion Sent directly by sender to the delegate to request that the file filename be opened as a linked file. The method should open the file without bringing up its application’s user interface—that is, work with the file is under programmatic control of sender, rather than under keyboard control of the user.

## See Also

### Related Documentation

- [application(_:printFile:)](appkit/nsapplicationdelegate/application(_:printfile:).md)

### Opening Files

- [application(_:open:)](appkit/nsapplicationdelegate/application(_:open:).md)
- [application(_:openFile:)](appkit/nsapplicationdelegate/application(_:openfile:).md)
- [application(_:openTempFile:)](appkit/nsapplicationdelegate/application(_:opentempfile:).md)
- [application(_:openFiles:)](appkit/nsapplicationdelegate/application(_:openfiles:).md)
- [applicationShouldOpenUntitledFile(_:)](appkit/nsapplicationdelegate/applicationshouldopenuntitledfile(_:).md)
- [applicationOpenUntitledFile(_:)](appkit/nsapplicationdelegate/applicationopenuntitledfile(_:).md)
