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

Mozilla サポートの検索

サポート詐欺に注意してください。 私たちはあなたに通話やショートメッセージの送信、個人情報の共有を求めることはありません。疑わしい行為を見つけたら「迷惑行為を報告」からご報告ください。

詳しく学ぶ

このスレッドはアーカイブに保管されました。 必要であれば新たに質問してください。

sending thunderbird mail using access vba

  • 1 件の返信
  • 1 人がこの問題に困っています
  • 194 回表示
  • 最後の返信者: 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

選ばれた解決策

Have you tried using

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

All these required objects can be a string variable.

この回答をすべて読む 👍 0

すべての返信 (1)

more options

選ばれた解決策

Have you tried using

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

All these required objects can be a string variable.