Controls and underlying vba code not working



I’ve created a test document with a button and some code behind it. However, when I open it with aspose.word, I am unable to click on the button. When I right click on the button and select “Object”, I get a messagebox stating, "This object is corrupt or is no longer available."

I am running version 1.7 of aspose.word (demo).

Any idea why it isn’t working?




We know VBA projects are preserved okay as well as any custom toolbars you might have in a document. I will double check what about controls such as in your example and report back in 2-3 days.



Doesn't seem to be entirely true with respect to custom toolbars. After reading your last reply, I tried using a toolbar control instead, and the result is worse than with a command button; saving the document to the disk via aspose.word affects the document such that if I attempt to open it either via aspose.word or directly within windows explorer, Word goes into error, with a message that the file is damaged or corrupted.

I'm running aspose.word ver 1.7 (demo), Office 2003, on Windows XP Pro (SP 1)



The main problem for us is that everything related to controls, toolbars, vba etc inside Word documents is not documented to us.

If you email your document to me to, it could help the investigation.


Hi Mark,

Thanks, I’ve received your document.

I’m afraid I cannot make the controls to work now as the form is undocumented. I see Aspose.Word preserves the control, but it loses the connection between the control and its event handlers in vba code.

In my tests custom toolbars work okay. So if you have a problem with custom toolbars, please send me that document too.

Certainly, if you can get away with just VBA code without the controls, it will be a good workaround.


Aspose.Word 2.1 is out and the controls are working fine with it.