- Katılım
- 14 Ocak 2008
- Mesajlar
- 176
- Excel Vers. ve Dili
- 2010 türkçe
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub mailgon()
Dim strDate As String
Dim OutApp As Outlook.Application
Dim NewMail As Outlook.MailItem
For x1 = 6 To Cells(Rows.Count, 3).End(3).Row
Set OutApp = New Outlook.Application
Set NewMail = CreateItem(olMailItem)
With NewMail
On Error Resume Next
.To = Cells(x1, 3).Value
.Subject = Cells(x1, 2).Value
.Body = Cells(x1, 4).Value
dosya = Split(Cells(x1, 5).Value, ", ")
For X2 = 0 To UBound(dosya)
.Attachments.Add "C:\Users\Hakan\Desktop\Dağıtım\" & dosya(X2) & ".xls"
.Attachments.Add "C:\Users\Hakan\Desktop\Dağıtım\" & dosya(X2) & ".Doc"
Next X2
.Save
.Send
End With
Set NewMail = Nothing
Set OutApp = Nothing
Next x1
End Sub
Windows Live mail iletilerinizi outlook tan alacak şekilde pop3 ile yönlendirin. Böylelikle mevcut kodları sorunsuzca kullanabilirsiniz.Yalnız Windows Live Mail kullanıyorum. Bu kodu Windows Live Mail'e göre nasıl uyarlayabiliriz.
Sub Mail_Gonder()
Dim K1 As Workbook, K2 As Workbook, S1 As Worksheet
Dim Klasor As Object, Yol As String
Dim X As Long, Y As Byte, Z As Byte
Dim Dosya As Variant, Adres As Variant
Set K1 = ThisWorkbook
Set S1 = K1.Sheets("mail listesi")
Set Klasor = CreateObject("Shell.Application").BrowseForFolder(0, "Klasör Seçiniz...", 1)
If Klasor Is Nothing Then Exit Sub
Yol = Klasor.Items.Item.Path
On Error Resume Next
For X = 6 To S1.Cells(Rows.Count, 2).End(3).Row
Dosya = Split(Trim(S1.Cells(X, 5)), ",")
For Y = 0 To UBound(Dosya)
If Dir(Yol & "\" & Trim(Dosya(Y))) <> "" Then
Set K2 = Workbooks.Open(Yol & "\" & Trim(Dosya(Y)))
Adres = Split(Trim(S1.Cells(X, 3)), ",")
For Z = 0 To UBound(Adres)
K2.SendMail Trim(Adres(Z)), S1.Cells(X, 2)
Next
K2.Close False
End If
Next
If Err.Number = 0 Then Exit For
Next
On Error GoTo 0
MsgBox "İşleminiz tamamlanmıştır.", vbInformation
End Sub
Ayarların nasıl yapılacağı aşağıda ki bağlantıda iyi anlatılmış.Bu söylediğiniz şeyi nasıl yapacağım, yardımcı olabilirmisiniz? windows 7 kullanıyorum. Varsayılan e posta yöneticisi Windows Live Mail