Macro script for sending mail from Calc

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
Haese005
Posts: 4
Joined: Wed Mar 22, 2017 7:02 pm

Macro script for sending mail from Calc

Post by Haese005 »

Hello,
I am from the Netherlands and no one here seems not be able to help me :crazy: . My problem is that I am searching for the script for sending a email from a button (Verzenden) in a CALC spreadsheet. I am using Outlook as email client.
i want to send the spreadsheet with the subject name to 2 receivers. That's all!
Who can help me with this? I have put the spreadsheet in the attachment.
Greetz Wout
Attachments
DAGREGISTRATIE SNEL SCHOON ZUID-OOST NIEUWE STIJL 2 0.xlsm
(21.33 KiB) Downloaded 161 times
OpenOffice 4.13 and Operating system: Windows 10
Email Client: Outlook
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: macro script for sending mail from calc

Post by Zizi64 »

I am using Outlook as email client.
1.: You need use a real Email client software like the Thunderbird.
(This process worked for me with the old Outlook Express software too in the far past time...)

2: You must rewrite all of your MS VBA macros, because THE MS VBA and the API of the AOO/LO are not compatible.
And use the International Standard ODF fileformats instead of the old fashioned binary .slx, or the "half standardized" .xlsx format. (The MS nor support the Strict version of the OOXML standard.
Last edited by Zizi64 on Sat Apr 29, 2017 1:56 pm, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
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
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: macro script for sending mail from calc

Post by Zizi64 »

Here are example code snippets based on the API of the AOO/LO:

viewtopic.php?f=20&t=88006&p=413337
viewtopic.php?f=45&t=77329&p=353182
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
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.
Haese005
Posts: 4
Joined: Wed Mar 22, 2017 7:02 pm

Re: macro script for sending mail from calc

Post by Haese005 »

Thanks Zizi64 for your super fast reaction! My problem is that the company I work for only want to use Outlook. Is it still possible ?
OpenOffice 4.13 and Operating system: Windows 10
Email Client: Outlook
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: macro script for sending mail from calc

Post by Zizi64 »

I never used the Outlook. I do not know anything about it.

Related topics:
viewtopic.php?f=15&t=85307
viewtopic.php?f=15&t=88192
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
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.
Haese005
Posts: 4
Joined: Wed Mar 22, 2017 7:02 pm

Re: macro script for sending mail from calc

Post by Haese005 »

Again thanks Zizi64. I am going to try the options given in your links.
OpenOffice 4.13 and Operating system: Windows 10
Email Client: Outlook
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: macro script for sending mail from calc

Post by Villeroy »

This office suite comes with a full Python runtime. You can program anything you want in Python.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply