VBA Command Button gets corrupted

Hello, I’ve just got into a project that uses Aspose, and I don’t know much about it.

I’ve got a dotm file with a command button that’s executes some Vba script. When this file is processed by Aspose.Words and then saved as docm, when I open it in Word the command button has become an image (the macros are still in the document though) and it’s opened in compatibility mode.

Aspose.Words version is 2010.05.14 and I believe it is the trial version.
MS Word 2010.

Thanks in advance, Google couldn’t help me at all, except for someone having similar issues back in 2004.

Hi there,

Thanks for your inquiry. Please note that there is no way to create or modify macros using Aspose.Words; macros are preserved upon open and save with Aspose.Words. I would suggest you please upgrade to the latest version (v13.2.0) from here and let us know how it goes on your side. If the problem still remains, please share the following details for testing purposes:

  • Please supply us with the code from your application that is causing the issue
  • Please supply us with the sample input source Word documents that are causing the issue
  • Please supply us with the output document showing the undesired behavior
  • Please supply us with the target/expected document showing the desired behavior. You can create this document using Microsoft Word. We will investigate the structure as to how you would like your target document to be generated like

As soon as you get these pieces of information to us we’ll start our investigation into your issue.

It turns out we do have a license, it’s just outputting the Trial Version text because it hasn’t been set properly in this application (an usual issue people have, from what google told me). So I don’t think we can upgrade (we’d need to purchase the newest version, since this license seems to be from a while ago, right?).

I just tried the simplest possible application: http://pastebin.com/49aVQJQD
Both input and output files are in the attachment.

I’ll also supply an expected document, but my only desire is for the VBA control not to become an image (example is a really simple document). =]

Thanks in advance.

Hi,

Thanks for sharing the documents. I have tested the scenario while using latest version of Aspose.Words for .NET and have not found any issue with output Dotm. Please use the latest version of Aspose.Words for .NET. I have attached the output Dotm file with this post for your kind reference.

Moreover, please note that new versions of Aspose.Words for .NET come out at the end of every month. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.

The version I am using is 2010.05.14. Do you not give support for older versions?

Hi,

Thanks for your inquiry. We don’t provide support for older released versions of Aspose.Words. Please note that we do not provide any fixes or patches for old versions of Aspose products either. All fixes and new features are always added into new versions of our products. So, you will have to upgrade if you need new features or fixes.

Please download the latest version of Aspose.Words for .NET 13.2.0 from here:
https://releases.aspose.com/words/net