(05/11/2015, 12:50)ozanakkaya yazdı: Mesajımdan yaptığınız alıntıda hatanız yazıyor.Merhaba,
Herhangi bir soru(n) için konu açtıysanız verilen cevapları inceleyip en kısa zamanda yapılan yardımın olumlu ya da olumsuz sonucunu bildiriniz.
Üstteki mesajıma eklediğim bağlantılardaki konular size ait. Hiç birisine geri bildirimde bulunmamışsınız.
Aşağıdaki kodu modüle kaydet
Public Function OutlookGonder(GStart As Date, GSubject As String, GBody As String, GRecipients As String)
DoCmd.RunCommand acCmdSaveRecord
Dim outobj As New Outlook.Application
Dim outappt As Outlook.AppointmentItem
On Error Resume Next
Set outobj = GetObject(, "Outlook.Application")
If Err <> 0 Then
Set outobj = CreateObject("Outlook.Application")
Err.Clear
End If
Set outobj = CreateObject("Outlook.Application")
Set outappt = outobj.CreateItem(olAppointmentItem)
With outappt
.Start = CDate(GStart) & " " & CDate("0,4375")
.Duration = "1440"
.Subject = "" & GSubject
.Body = "" & GBody
.MeetingStatus = olMeeting
.Recipients.Add (GRecipients)
.ReminderMinutesBeforeStart = "60"
.ReminderSet = True
.Save
End With
outappt.Display
End Function
Formda butonun tıklandğında olayına
Call OutlookGonder(Metin666, Metin111, Metin54, Metin400)
şeklinde kod ekle.
Sonuç hakkında olumlu/olumsuz bildirimde bulun
Yazdığınız kodu pek anlayamadım. ama şu şekilde denedim oldu:
Public Function takvim()
DoCmd.RunCommand acCmdSaveRecord
Dim outobj As New Outlook.Application
Dim outappt As Outlook.AppointmentItem
On Error Resume Next
Set outobj = GetObject(, "Outlook.Application")
If Err <> 0 Then
Set outobj = CreateObject("Outlook.Application")
Err.Clear
End If
Set outobj = CreateObject("Outlook.Application")
Set outappt = outobj.CreateItem(olAppointmentItem)
With outappt
.Start = CDate(Forms!bakimYAP!Metin666) & " " & CDate("0,4375")
.Duration = "1440"
.Subject = "" & Forms!bakimYAP!Metin39
.Body = "" & Forms!bakimYAP!Metin8
.MeetingStatus = olMeeting
.Recipients.Add (Forms!bakim!Metin400)
.ReminderMinutesBeforeStart = "60"
.ReminderSet = True
.Save
End With
outappt.Display
End Function
---------------------------
Yardımlarınız için teşekkür ederim, sorun çözüldü.