I programmed HAL 9000
I programmed HAL 9000

Reputation: 99

Office Word macro language

I recently learned that I could create Office Word macros with Visual Basic, but is it possible to use a different language? Visual Basic is ok for beginners, but I want to know if it's possible to use different languages, and how to set them up.

PS: Is lua possible at all? I love lua. I immagine lua would be a good macro language.

Upvotes: 4

Views: 1546

Answers (1)

enderland
enderland

Reputation: 14175

This related question is a good example of using lua with Excel. It in fact contains a lot of documentation about getting lua/Excel talking.

You can't directly work with other languages in Excel the way you can VBA. However, a lot of languages do have the ability to create COM objects (such as in the example above) which let you interact with Excel quite similarly to how you otherwise would do in VBA. Here's a Python package which does similarly.

But if you want to basically write lua code in the VBA editor and "change language" then no, you can't.

Upvotes: 2

Related Questions