We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Running a macro in word

hi,
can any one please tell me how can i run a macro through aspose

This message was posted using Aspose.Live 2 Forum

Hi

Thanks for your inquiry. There is no way to add or run macro programmatically using Aspose.Words. Aspose.Words just preserves macros (VBA project) existing in a Word document without changes.
Best regards,

1 Like

H AndreyN,
Thank’s for ur immediate response. i am presently stuck up with a issue.

My Requriment is like bleow.

I will be having a template document in server.i will be getting the Document and while the document is getting open i need to run the macro.

can u guide me how can i proceed.

Advance Thanks
Rajesh

Hi Rajesh,

Thank you for additional information. As I mentioned earlier, there is no way to run macro during opening document with Aspose.Words. But you can create AutoOpen macro which will be running during opening document with MS Word. I think this article will help you to achieve what you need:
https://wordmvp.com/FAQs/MacrosVBA/DocumentEvents.htm

Best regards,