[Calc] Per Makro Email versenden

Nun ich habe jetzt ein Formular mit Open Office Base erstellt.
In dem sind die Daten von meinen Kontakten enthalten.
Nun möchte ich per Makro meinen offenen Browser aufrufen, wo ich bereits
in gmail eingeloggt bin.
Die Daten, wie Emailadresse, Betreff und einige weitere Textfelder sollten in die
Email mit übernommen werden. Sodass ich die Email direkt abschicken kann und
ggfs. auch ein paar kleine Änderungen vornehmen.
 
Wärst du dann so nett und postest deine Lösung hier? Dann können andere mit der gleichen Frage davon profitieren.
 
Natürlich, ich nutze Thunderbird als Mail-Client.

Code:
Sub SendMail
   Dim oDoc, oForm as Object
   Dim betr,  sMail_Adr, sMail_Anr as String
   oDoc = thisComponent
   oForm = oDoc.drawpage.forms.getbyindex(0)
   oSubForm = oForm.getByName("F_Kontakte").getByName("Kontakte")
   sMail_Adr = oSubForm.getByName("txtEmail").Text
   sMail_betr = oSubForm.getByName("Mails").getByName("txtBetreff").Text
   sMail_Inh = oSubForm.getByName("Mails").getByName("txtInhalt").Text
   sMail_Anr = oSubForm.getByName("txtAnrede").Text
   sMail_nix = oSubForm.getByName("listAnrede")
   attN = oSubForm.getByName("Mails").getByName("txtAnhang").Text
   sMail_Vorn = oSubForm.getByName("txtVorname").Text
   oCombobox = oSubForm.getbyname("combAnrede")
   oCombobox.refresh
   oListsource = "SELECT ""ID"" FROM ""Anrede"""
   oCombobox.ListSource = oListsource
   oCombobox.refresh
   oComboWert=oCombobox.currentValue
   
   oCombobox2 = oSubForm.getbyname("combUmgang")
   oCombobox2.refresh
   oListsource2 = "SELECT ""ID"" FROM ""SiezenDuzen"""
   oCombobox2.ListSource = oListsource2
   oCombobox2.refresh
   oComboWert2=oCombobox2.currentValue
   
   if oComboWert = "" then
   sMail_Gen = ""
   elseif oComboWert = "0" then
   sMail_Gen = "Frau "
   elseif oComboWert = "1" then
   sMail_Gen = "Herr "
   else
   sMail_Gen = "Falsche Eingabe"
   end if
   
   if oComboWert2 = "" then
   sMail_Umg = ""
   elseif oComboWert2 = "0" then
   sMail_Umg = sMail_Vorn
   elseif oComboWert2 = "1" then
   sMail_Umg = (sMail_Gen + sMail_Anr)
   else
   sMail_Gen = "Falsche Eingabe"
   end if
   
   if attN = "" then
   attA = ""
   else
   attA = ConvertToURL (attN)
   end if
   
   empf = (sMail_Adr)
   betr = (sMail_betr) 'Betreffzeile
   anrT = ("Hallo "+ sMail_Umg + "&#44;" + " " + "<br><br>" + sMail_Inh)
   shell("C:\Program Files\Mozilla Thunderbird\thunderbird.exe",1,"-compose to=" + empf +",attachment=" + attA + ",subject=" + betr  + ",body=" + anrT)
End Sub
 
Zurück