Fail to read VBA Macros from DOCM using .NET

We are unable to fetch VBA macros in .docm files using Aspose.Word in our .NET application.

In our current implementation for other files, we check Aspose.Words.Document.HasMacros property, and if the value is “true”, we read the vba project from the package part of content type “application/”.

In case of .docm, Aspose.Words returns “false” when trying to get the Doc.HasMacros value, and the package part we seek cannot be found.


Could you please ZIP and attach your .docm document here for testing? We will investigate the issue and provide you more information on it.

Thanks. Here you are: Undetected (8.7 KB)


Your document has not macros and Document.HasMacros returns false. We suggest you please use the latest version of Aspose.Words for .NET 20.9.