<!--
{
  "availability" : [
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSAttributedStringDocumentType",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@T@NSAttributedStringDocumentType"
  },
  "title" : "NSAttributedStringDocumentType"
}
-->

# NSAttributedStringDocumentType

Constants for the document type document attribute key.

```
typedef NSString * NSAttributedStringDocumentType;
```

## Discussion

Use these constants as values for the [`NSDocumentTypeDocumentAttribute`](/documentation/AppKit/NSDocumentTypeDocumentAttribute) key in the document attributes dictionary.

## Topics

### Getting keys for document types

[`extern NSAttributedStringDocumentType NSDocFormatTextDocumentType;`](/documentation/AppKit/NSDocFormatTextDocumentType)

Microsoft Word document.

[`extern NSAttributedStringDocumentType NSHTMLTextDocumentType;`](/documentation/AppKit/NSHTMLTextDocumentType)

Hypertext markup language (HTML) document.

[`extern NSAttributedStringDocumentType NSMacSimpleTextDocumentType;`](/documentation/AppKit/NSMacSimpleTextDocumentType)

Macintosh SimpleText document.

[`extern NSAttributedStringDocumentType NSOfficeOpenXMLTextDocumentType;`](/documentation/AppKit/NSOfficeOpenXMLTextDocumentType)

ECMA Office Open XML text document format.

[`extern NSAttributedStringDocumentType NSOpenDocumentTextDocumentType;`](/documentation/AppKit/NSOpenDocumentTextDocumentType)

OASIS Open Document text document format.

[`extern NSAttributedStringDocumentType NSPlainTextDocumentType;`](/documentation/AppKit/NSPlainTextDocumentType)

Plain text document.

[`extern NSAttributedStringDocumentType NSRTFTextDocumentType;`](/documentation/AppKit/NSRTFTextDocumentType)

Rich text format document.

[`extern NSAttributedStringDocumentType NSRTFDTextDocumentType;`](/documentation/AppKit/NSRTFDTextDocumentType)

Rich text format with attachments document.

[`extern NSAttributedStringDocumentType NSWebArchiveTextDocumentType;`](/documentation/AppKit/NSWebArchiveTextDocumentType)

WebKit WebArchive document.

[`extern NSAttributedStringDocumentType NSWordMLTextDocumentType;`](/documentation/AppKit/NSWordMLTextDocumentType)

Microsoft Word XML (WordML schema) document.



---

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)