OpenOffice Macro in MS Office document?

Creating a macro - Writing a Script - Using the API

OpenOffice Macro in MS Office document?

Postby EddyWally » Tue Aug 01, 2017 8:07 pm


I'm looking for a way to put a valid OpenOffice Macro in a .doc(x) or .xls(x) file. The macro should run if OpenOffice opens this file.

I am aware of the fact that OpenOffice does not use VBS, but the macro doesn't have to work in Microsoft Word. I just need to save it as a .doc(x) or .xls(x) file due to a file extension policy I cannot change. It needs to be a valid MS Office document: changing the .ods to .xls for example won't work.

Any ideas?

Thanks in advance!
OpenOffice 3.1 / Mac
Posts: 1
Joined: Tue Aug 01, 2017 7:57 pm

Re: OpenOffice Macro in MS Office document?

Postby Zizi64 » Tue Aug 01, 2017 8:45 pm

The API of the AOO/LO is not compatible with the MS VBA.

If you must create and use VBA macros, and MS fileformats then you need buy a MS Office.

Always use the International Standard ODF format and the API and one of the supported programming languages for the AOO and LO.

The LO (LibreOffice) has a littlebit higher compatibility with the foreign fileformats and with the VBA macros than the AOO (Apache OpenOffice).
Tibor Kovacs, Hungary; LO4.4.7, LO5.4.7 on Win7x64Prof.
PortableApps, winPenPack: LO3.3.0-LO6.0.5 and AOO4.1.5
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Posts: 6892
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: OpenOffice Macro in MS Office document?

Postby Villeroy » Tue Aug 01, 2017 9:33 pm

Last time when I tried (may be 10 years ago) it made MS Office crash. MS Office does not expect anything like that in its own office files.
Recent versions of MS Office can read and write ODF documents. ODF is the one and only industry standard for office documents. Use it.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Posts: 25464
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 4 guests