0
コードに記載されている2つのセルから新しいメールを作成します。新しい電子メールには、電子メール署名が添付されていません。新しいメールアイテムにOutlookの署名を追加する
私はそれを解決しようとしましたが、少し苦労しています。それはHTMLBody
の参照からそれを引き出すのですか?
Sub SendHTMLEmail(from_sender As String, what_address1 As String, cc_sender As String, subject_line1 As String, mail_body1 As String)
Dim olapp As Outlook.Application
Dim olmail As Outlook.MailItem
Set olapp = CreateObject("Outlook.Application")
Set olmail = olapp.CreateItem(olMailItem)
olmail.SentOnBehalfOfName = from_sender
olmail.To = what_address1
olmail.CC = cc_sender
olmail.Subject = subject_line1
olmail.HTMLBody = mail_body1
olmail.Display
End Sub
Sub SendHoldingEmail()
Dim EmailWordings As Excel.Worksheet
Dim row_number As Long
Dim from_sender As String, cc_sender As String, Email_Subject As String, full_name As String, mail_body_message As String
Set EmailWordings = ThisWorkbook.Sheets("EmailWordings")
row_number = 1
Do
DoEvents
row_number = row_number + 1
from_sender = "[email protected]"
cc_sender = "[email protected]"
mail_body_message = EmailWordings.Range("D3")
Email_Subject = EmailWordings.Range("B3")
Call SendHTMLEmail(from_sender, "", cc_sender, Email_Subject, mail_body_message)
Loop Until row_number = 2
End Sub