I'm new with openoffice and i'm trying to send one active Calc file to Thunderbird as attachment
the code i have wrote is the following:
Code: Select all
Dim Path As String
Dim thund As String
Dim email As String
Dim subj As String
Dim body As String
email = "my email"
subj = "Teste"
body = "Teste envio"
Path = "D:\Compras\Encomendas 2020.ods"
thund = "C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe " & _
"-compose " & """" & _
"to='" & email & "'," & _
"cc='" & cc & "'," & _
"bcc='" & bcc & "'," & _
"subject='" & subj & "'," & _
"body='" & body & "'" & """"
If Path = "" Then 'no attachment
'do nothing
Else 'with attachment
thund = thund & ",attachment=" & Path
End If
Call Shell(thund, vbNormalFocus)
All works fine except the attachment.
This macro is linked to a push button on my sheet.
Tks for the help
Manuel