Page 1 of 1

Calc Macro

Posted: Wed Jun 28, 2017 5:32 pm
by det
I wrote a macro for a Spreadsheet and like to send it either by email or flash drive to another person who should be able to run the macro. If I copy to a flash drive or attach to an email, the macro is lost. What do I and the recipient have to do to keep the macro attached to the spreadsheet? Is there an answer to my problem?
Det

Re: Calc Macro

Posted: Wed Jun 28, 2017 6:01 pm
by Zizi64
1.: Use the native, International Standard ODF fileformats (.ods in this case).
2.: Embed the macro into the document. The receiver must be use the one of the opensource office suites (AOO or LO), and must set the macro security to "Medium" if he/she want to run the macros embedded in the downloaded ODF document.

Re: Calc Macro

Posted: Wed Jun 28, 2017 8:00 pm
by det
Thank you, it worked with sending ods.
My question, however, was misleading. I now realize it should have been:
I wrote in ods,(macro worked) then I saved as xls (macro worked).
How can I send the xls version with the macro attached?
The recipient has only xls. Is there a better way than sending the macro separately in a Document and let the recipient paste it into the module?
Det

Re: Calc Macro

Posted: Wed Jun 28, 2017 8:04 pm
by RoryOF
Different underlying engines in OpenOffice and in Excel; macros don't work across the different platforms.

Re: Calc Macro

Posted: Wed Jun 28, 2017 8:25 pm
by Zizi64
wrote in ods,(macro worked) then I saved as xls (macro worked).
How can I send the xls version with the macro attached?
The recipient has only xls.
The API of the AOO and the MS VBA of the Excel are NOT compatible. AOO macros can not run in Excel. The simpliest MS VBA macros can run in the LibreOffice, because LO has a littlebit higher compatibility with the foreign fileformats and the MS VBA.

But you must use the API functions and the native fileformats, if you want work efficiently with the AOO and the LO.

Re: Calc Macro

Posted: Wed Jun 28, 2017 9:01 pm
by det
Thank you for the answers.
To solve my problem I would have to program in Excel.
Det