Calc Macro

Creating a macro - Writing a Script - Using the API

Calc Macro

Postby det » Wed Jun 28, 2017 5:32 pm

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
OpenOffice 4.1.3 on windows 7
det
 
Posts: 25
Joined: Fri Mar 31, 2017 8:24 pm

Re: Calc Macro

Postby Zizi64 » Wed Jun 28, 2017 6:01 pm

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.
Tibor Kovacs, Hungary; LibreOffice4.4.7 on Win7x64Prof.
And the portable versions: LO3.3.0-LO5.3.4 and AOO4.1.3
Please, edit the topic's initial post, and add the word "[Solved]" at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 5601
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Calc Macro

Postby det » Wed Jun 28, 2017 8:00 pm

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
OpenOffice 4.1.3 on windows 7
det
 
Posts: 25
Joined: Fri Mar 31, 2017 8:24 pm

Re: Calc Macro

Postby RoryOF » Wed Jun 28, 2017 8:04 pm

Different underlying engines in OpenOffice and in Excel; macros don't work across the different platforms.
Apache OpenOffice 4.1.3 on Xubuntu 16.04 (mostly 64 bit version) and infrequently on Win2K/XP
14 October 2016 was Pooh's 90th birthday
User avatar
RoryOF
Moderator
 
Posts: 24731
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Calc Macro

Postby Zizi64 » Wed Jun 28, 2017 8:25 pm

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.
Tibor Kovacs, Hungary; LibreOffice4.4.7 on Win7x64Prof.
And the portable versions: LO3.3.0-LO5.3.4 and AOO4.1.3
Please, edit the topic's initial post, and add the word "[Solved]" at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 5601
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Calc Macro

Postby det » Wed Jun 28, 2017 9:01 pm

Thank you for the answers.
To solve my problem I would have to program in Excel.
Det
OpenOffice 4.1.3 on windows 7
det
 
Posts: 25
Joined: Fri Mar 31, 2017 8:24 pm


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 5 guests