I use this code to determine file type:
FileFormatInfo info = FileFormatUtil.DetectFileFormat(MyDir + "Document.doc"); Console.WriteLine("The document format is: " + FileFormatUtil.LoadFormatToExtension(info.LoadFormat)); Console.WriteLine("Document is encrypted: " + info.IsEncrypted);
But when I tried to detect file type for password protected docm and dotm - I received following:
The document format is: .docx
Document is encrypted: True
Is it correct behavior?
docm and dotm without password protection are identified fine.