schlecht
Altın Üye
- Katılım
- 13 Kasım 2009
- Mesajlar
- 337
- Excel Vers. ve Dili
- Ofis 2016 TR 64 Bit
- Altın Üyelik Bitiş Tarihi
- 23-02-2025
Merhaba aşağıdaki kod ile mail taslağı oluşturuyorum. Konu, mail içeriği vb... şeyler ekliyorum. Body içeriğine Kartvizit ekleme imkanı var mı?
Sub Mail_Gonder()
Dim OutApp As Object, OutMail As Object
Dim S1 As Worksheet, S2 As Worksheet, Alan As Range
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
Set S1 = Sheets("Sayfa1")
Set Alan = S1.Range("A1:l31")
strBody = "<b>" & S1.Range("b10").Value & "</p></b>" & _
"<b>" & S1.Range("b11").Value & "</b>" & _
"<b>" & S1.Range("b12").Value & "</b>"
On Error Resume Next
With OutMail
.To = S1.Range("b1").Value
.Cc = ""
.Bcc = ""
.Subject = S1.Range("b9").Value
.HTMLBody = strBody
.Display
End With
On Error GoTo 0
Set Alan = Nothing
Set S1 = Nothing
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Sub Mail_Gonder()
Dim OutApp As Object, OutMail As Object
Dim S1 As Worksheet, S2 As Worksheet, Alan As Range
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
Set S1 = Sheets("Sayfa1")
Set Alan = S1.Range("A1:l31")
strBody = "<b>" & S1.Range("b10").Value & "</p></b>" & _
"<b>" & S1.Range("b11").Value & "</b>" & _
"<b>" & S1.Range("b12").Value & "</b>"
On Error Resume Next
With OutMail
.To = S1.Range("b1").Value
.Cc = ""
.Bcc = ""
.Subject = S1.Range("b9").Value
.HTMLBody = strBody
.Display
End With
On Error GoTo 0
Set Alan = Nothing
Set S1 = Nothing
Set OutMail = Nothing
Set OutApp = Nothing
End Sub