Discuss this help topic in SecureBlackbox Forum

Find type and format of Office document

To detect the Office document format you need to use TElOfficeDocument.DocumentFormat property. Then, depending on the value of this property, you can access BinaryDocument, OpenXMLDocument, OpenXPSDocument or OpenDocument properties of TElOfficeDocument, which provide access to custom properties, related to the particular format.

For binary, OpenXML and OpenDocument format you can read TElOfficeDocument.DocumentType property, which describes the document type (for example, Document, Spreadsheet or Presentation document type for binary documents of Microsoft Office).

Additionally, you can use DocumentFormatToString(), BinaryDocumentTypeToString(), OpenXMLDocumentTypeToString() or OpenDocumentTypeToString() functions in SBOffice unit/namespace to convert document format and type values to a string.

How To articles about common Office tasks

Discuss this help topic in SecureBlackbox Forum