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

Free Support Forum - aspose.com

How to get macros names from a Word document using Java

Hi,

I am using Aspose.words for
java 3.2.0 for mail merge.

My Requriment:

I have a macro for my Template Document.When i open the document the marco will be running.
Now when i try to run the same Template through Aspose the macro is not being executed.


Can any one please let me know , how can i execute a macro through Aspose.

Advance Thanks…



how to run macros using aspose.words for java


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.

Hi,

I found hasmacros() and removemacros() methods in Document class. Is there a way to get the macro names.

Thanks ,
Nalini

Hi

Thanks for your request. There is no way to get macro name using Aspose.Words.

@Nalini

With the latest version of Aspose.Words for Java 20.5, you can read and write VBA macros. Please read the following article about working with VBA macros. .
Working with VBA Macros