Windows 10 will reach EOS (end of support) on October 14, 2025. For more information, see this article.

Pomoc přepytać

Hladajće so wobšudstwa pomocy. Njenamołwimy was ženje, telefonowe čisło zawołać, SMS pósłać abo wosobinske informacije přeradźić. Prošu zdźělće podhladnu aktiwitu z pomocu nastajenja „Znjewužiwanje zdźělić“.

Dalše informacije

sending thunderbird mail using access vba

  • 1 wotmołwa
  • 1 ma tutón problem
  • 194 napohladow
  • Poslednja wotmołwa wot bruce13

more options

Hi

I am using Thunderbird to send email via access 2007 vba. Everything is ok until I get to the email send.

In the body, the text is duplicated using text that is not in the application. I have copied my code below, I cannot spot anything that is incorrect, any help would be appreciated.

Thanks in anticipation

Attachment1 = Environ("userprofile") & "\desktop\Batley Cemetery Grave Enquiry.pdf" 'Grave Enquiry

 Attachment2 = Environ("userprofile") & "\documents\bleak house\batley cemetery\pdfs\BatleyCemeteryFullplan.pdf"    'Full Graveyard Plan
'Attachment3 added in Grave Plans Section                                                                            Section Plan
 Attachment4 = Environ("userprofile") & "\documents\datafiles\batley cemetery\pdfs\batleycemeteryinfosheet.pdf"     
      

email = Address

CC = vbNullString bcc = vbNullString

SendFrom = "gravesearches@bleakhousefamilyhistory.co.uk" Subject = "Your Grave Enquiry for Batley Cemetery for Surname - " + Surname + " - Grave Reference - " + GraveRef EmailBody = vbNullString EmailBody = "Please find Your Grave Enquiry as requested.

Bleak House Family History is a group funded purely by donations,

a donation for this service may be made by Cheque, Payable to Bleak House Family History

Sent to Bleak House Family History, C/o Elmwood Lodge, Timothy Lane, Carlinghow, Batley, Yorkshire, WF17 0AU

or

by Bank Transfer using the Sort Code of 77 14 15 and Account Number of 25439568.

Please Confirm Receipt of this Email by Return.

Regards gravesearches@BleakHouseFamilyHistory

===================="

Attachment = Attachment1 + "," + Attachment2 + "," + Attachment3 + "," + Attachment4

Thund = "C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe" & _

       " -compose " & """" & _
       "from='" & SendFrom & "'," & _
       "to='" & email & "'," & _
       "cc='" & CC & "'," & _
       "attachment='" & Attachment & "'," & _
       "bcc='" & bcc & "'," & _
       "subject='" & Subject & "'," & _
       "body='" & EmailBody & "'," & """"

Call Shell(Thund, vbNormalFocus) For counter1 = 1 To 10000 Next 'Application.Wait (Now + TimeValue("0:00:03")) SendKeys "^{ENTER}", True

Hi I am using Thunderbird to send email via access 2007 vba. Everything is ok until I get to the email send. In the body, the text is duplicated using text that is not in the application. I have copied my code below, I cannot spot anything that is incorrect, any help would be appreciated. Thanks in anticipation Attachment1 = Environ("userprofile") & "\desktop\Batley Cemetery Grave Enquiry.pdf" 'Grave Enquiry Attachment2 = Environ("userprofile") & "\documents\bleak house\batley cemetery\pdfs\BatleyCemeteryFullplan.pdf" 'Full Graveyard Plan 'Attachment3 added in Grave Plans Section Section Plan Attachment4 = Environ("userprofile") & "\documents\datafiles\batley cemetery\pdfs\batleycemeteryinfosheet.pdf" email = Address CC = vbNullString bcc = vbNullString SendFrom = "gravesearches@bleakhousefamilyhistory.co.uk" Subject = "Your Grave Enquiry for Batley Cemetery for Surname - " + Surname + " - Grave Reference - " + GraveRef EmailBody = vbNullString EmailBody = "<b>Please find Your Grave Enquiry as requested.</b><br><br>Bleak House Family History is a group funded purely by donations,<br><br> a donation for this service may be made by <b>Cheque, Payable to Bleak House Family History</b><br><br>Sent to <b>Bleak House Family History, C/o Elmwood Lodge, Timothy Lane, Carlinghow, Batley, Yorkshire, WF17 0AU</b><br><br>or<br><br> by <b>Bank Transfer using the Sort Code of 77 14 15 and Account Number of 25439568.</b><br><br>Please Confirm Receipt of this Email by Return.<br><br> Regards gravesearches@BleakHouseFamilyHistory<br><br><b>====================</b>" Attachment = Attachment1 + "," + Attachment2 + "," + Attachment3 + "," + Attachment4 Thund = "C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe" & _ " -compose " & """" & _ "from='" & SendFrom & "'," & _ "to='" & email & "'," & _ "cc='" & CC & "'," & _ "attachment='" & Attachment & "'," & _ "bcc='" & bcc & "'," & _ "subject='" & Subject & "'," & _ "body='" & EmailBody & "'," & """" Call Shell(Thund, vbNormalFocus) For counter1 = 1 To 10000 Next 'Application.Wait (Now + TimeValue("0:00:03")) SendKeys "^{ENTER}", True

Wubrane rozrisanje

Have you tried using

DoCmd.SendObject ,,,"EmailAddress","CC","BC","Subject","Msg"

All these required objects can be a string variable.

Tutu wotmołwu w konteksće čitać 👍 0

Wšě wotmołwy (1)

more options

Wubrane rozrisanje

Have you tried using

DoCmd.SendObject ,,,"EmailAddress","CC","BC","Subject","Msg"

All these required objects can be a string variable.