cyber_fatal
Yeni Üye
Sub Auto_Open()
Application.OnTime TimeValue("14:00:00"), "Gonder"
End Sub
Sub Gonder()
Dim Outlook As Object, Posta As Object, i&
Set Outlook = CreateObject("Outlook.Application")
Set Posta = Outlook.CreateItem(0)
Posta.BodyFormat = 2
For i = 2 To Cells(Rows.Count, "P").End(3).Row
If Cells(i, "P").Value = "" Then
With Posta
.To = Cells(i, "S").Value
.CC = "buraya CC'ye eklemek istediğiniz adresi(ler) yazın."
.Subject = "Buraya konuyu yazın"
.Body = "Bilgi bekleniyor."
.Send
End With
End If
Next i
Set Posta = Nothing: Set Outlook = Nothing: i = Empty
End Sub
Selamlar,Modül içerisine bu kodları yapıştırın, dosyayı kaydedip kapatın, tekrar açın.
Artık saat 14:00:00 olduğunda kodların olduğu dosyada kontrolü yapıp mail gönderecektir.
C++:Sub Auto_Open() Application.OnTime TimeValue("14:00:00"), "Gonder" End Sub Sub Gonder() Dim Outlook As Object, Posta As Object, i& Set Outlook = CreateObject("Outlook.Application") Set Posta = Outlook.CreateItem(0) Posta.BodyFormat = 2 For i = 2 To Cells(Rows.Count, "P").End(3).Row If Cells(i, "P").Value = "" Then With Posta .To = Cells(i, "S").Value .CC = "buraya CC'ye eklemek istediğiniz adresi(ler) yazın." .Subject = "Buraya konuyu yazın" .Body = "Bilgi bekleniyor." .Send End With End If Next i Set Posta = Nothing: Set Outlook = Nothing: i = Empty End Sub
Sub Auto_Open()
Application.OnTime TimeValue("00:00:20"), "Gonder"
End Sub
Sub Gonder()
Dim Outlook As Object, Posta As Object, i&
Set Outlook = CreateObject("Outlook.Application")
Set Posta = Outlook.CreateItem(0)
Posta.BodyFormat = 2
For i = 2 To Cells(Rows.Count, "P").End(3).Row
If Cells(i, "P").Value = "" Then
With Posta
.To = Cells(i, "S").Value
.CC = "buraya CC'ye eklemek istediğiniz adresi(ler) yazın."
.Subject = "Buraya konuyu yazın"
.Body = "Bilgi bekleniyor."
.Send
End With
End If
Next i
Set Posta = Nothing: Set Outlook = Nothing: i = Empty
Call Auto_Open 'Eklenen kod bu satır
End Sub