The following works fine for *.docx and *.docxm, it detects macro correctly
even if I rename the file extensions.
However, if I create a new doc with Office 2010, and save as (Word 97 - 2003) *.doc format,
or use one of your samples, such as fax.doc
it always return true
'VB.NET code:
function hasmacro(sfile as string) as boolean
Dim w As Spire.Doc.Document = New Document
w.LoadFromFileInReadMode(sfile, Spire.Doc.FileFormat.Auto)
'or simply w.LoadFromFile(sfile) 'same result...
return v.IsContainMacro()
end function
Macro detection for excel works fine.
Macro detection for presentation does not seems to be supported