The file extension is generally going to tell you what format the document is.
If you want more then use the Finder or System Events or mdls...
------------------------------------------------------------------------------
tell application "Finder"
set finderSelectionList to selection as alias list
if length of finderSelectionList = 0 then error "No files were selected in the Finder!"
set theItem to item 1 of finderSelectionList
end tell
tell application "System Events"
set itemFinderInfo to properties of theItem
end tell
set itemInfo to info for theItem
set theItemPath to quoted form of (POSIX path of theItem)
set shCMD to "mdls " & theItemPath
set mdlsInfo to do shell script shCMD
------------------------------------------------------------------------------