Hello
This problem is not related directly with the macro but her it goes.
I do need help
I' sending a email through a OpenOffice basic macro. The default email program is Thunderbird
I use this in several PC's and normally after the code a prompt appear that says "Another application is trying to send mail using this user profile. Do you want to send the email?".
If i press OK the mail goes but in one PC i clicked to not show the warning and i cant send the email.
I want to:
or show again the warning
or even better bypass and always allow sending this email.
Is it possible
Thanks.
Manuel
[Solved] Send email macro
[Solved] Send email macro
Last edited by Nelomf on Thu Apr 22, 2021 12:55 pm, edited 1 time in total.
Openoffice 4, Windows 7
Re: Send email macro
Please upload your macro code here.
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.
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.
Re: Send email macro
Why buttons and macros to send mails?
- Attachments
-
- t105067.ods
- (14.05 KiB) Downloaded 906 times
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
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Send email macro
God Morning
My macro
Note: It works perfectly on some PC's and others don't and the only problem (I think) it's Thunderbird setup.
My macro
Note: It works perfectly on some PC's and others don't and the only problem (I think) it's Thunderbird setup.
Code: Select all
Sub Comprasemail
Rem constroi PDF
mypdf
rem define nome do bar no sujeito do email
xSheet = ThisComponent.Sheets(1)
oCell = xSheet.getCellByPosition(1,0)
rem define data de envio do email
Dim basDate As Date
basDate = NOW()
rem enviar email
ThisComponent.store()
rem ----------------------------------------
sPathPDFs = "c:\encomendas\"
eMailAddress = "sede@ccdgondomar.pt"
eSubject ="F. encomendas"&" " & "de"&" " & oCell.string &" "&"enviada em"&" "& Day(basDate)&"/" &Month(basDate) &"/" &Year(basDate)
eBodyText = "Em anexo pode encontrar a minha encomenda da semana"
URL1 = convertToUrl(sPathPDFs & "encomenda.pdf")
rem URL2 = convertToUrl(sPathPDFs & "compras.pdf")
ArrayOfURLs = Array(URL1)
rem ----------------------------------------
eMailer = createUnoService("com.sun.star.system.SystemMailProvider")
eMailClient = eMailer.queryMailClient()
eMessage = eMailClient.createMailMessage()
eMessage.Recipient = eMailAddress
rem eMessage.BlindCopy = BCAdresses ' ??
eMessage.Subject = eSubject
eMessage.Body = eBodyText ' ??
eMessage.Attachement = ArrayOfURLs
eMailClient.sendMailMessage ( eMessage,com.sun.star.system.MailClientFlags.NO_USER_INTERFACE )
msgbox "A Sua encomenda foi enviada com exito"
ThisComponent.close(True)
End Sub
Last edited by robleyd on Wed Apr 21, 2021 9:06 am, edited 1 time in total.
Reason: Added Code tags
Reason: Added Code tags
Openoffice 4, Windows 7
Re: Send email macro
Because this sheet is intended to people that have very little understanding of software, they only place some numbers in a predefined table and then press a send button.Villeroy wrote:Why buttons and macros to send mails?
It's very easy for them to work this way.
The macros in this sheet filters the content of the sheet, save as pdf and send to me.
That's why.
Tanks
Openoffice 4, Windows 7
Re: Send email macro
This is the best reason to avoid any kind of spreadsheet. I never see any spreadsheet when something is easy to use. I see spreadsheets as applications mockups for drafting and easy development. With a few keystrokes, with copy&paste or drag&drop all your references, validations, formattings are futile. Easy to make is opposed to easy to use and vice versa.Nelomf wrote: Because this sheet is intended to people that have very little understanding of software
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
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Send email macro
Solved
I've installed in some computers a 64bit version of thunderbird and shoud be a 32 bit.
It works fine.
I will also try to set mapi.blind-send.enabled = to true or false to see if the message (Allow from external program...)appear or not.
~
Finally a question. Is it possible to close thunderbird (from the macro) after the mail goes out.
Thanks
I've installed in some computers a 64bit version of thunderbird and shoud be a 32 bit.
It works fine.
I will also try to set mapi.blind-send.enabled = to true or false to see if the message (Allow from external program...)appear or not.
~
Finally a question. Is it possible to close thunderbird (from the macro) after the mail goes out.
Thanks
Openoffice 4, Windows 7
Re: Send email macro
It's your opinion, i respect but dont agree.Villeroy wrote:This is the best reason to avoid any kind of spreadsheet. I never see any spreadsheet when something is easy to use. I see spreadsheets as applications mockups for drafting and easy development. With a few keystrokes, with copy&paste or drag&drop all your references, validations, formattings are futile. Easy to make is opposed to easy to use and vice versa.Nelomf wrote: Because this sheet is intended to people that have very little understanding of software
Thakns
Openoffice 4, Windows 7