docFormat(from:documentAttributes:)
Returns a data object that contains a Microsoft Word–format stream corresponding to the characters and attributes within the specified range.
Declaration
func docFormat(from range: NSRange, documentAttributes dict: [NSAttributedString.DocumentAttributeKey : Any] = [:]) -> Data?Parameters
- range:
The range.
- dict:
A required dictionary specifying the document attributes. The dictionary contains values from
Document Typesand must at least contain Documenttype.
Return Value
Returns a data object containing the attributed string as a Microsoft Word doc file.
Discussion
Raises an rangeException if any part of range lies beyond the end of the receiver’s characters.