D
David
This routine is under my CurrentOutlookSession....
Sub Application_Reminder(ByVal Item As Object)
If TypeOf Item Is AppointmentItem Then
'create subject line
Dim subject1 As String
subject1 = "Appointment Reminder: " & Item.subject
'Call new AppoinmentMail to send email
NewReminders.NewAppointmentMail subject1
End If
If TypeOf Item Is TaskItem Then
'create subject line
Dim subject2 As String
subject2 = "Task Reminder: " & Item.subject
'Call new TaskMail to send email
NewReminders.NewTaskMail subject2
End If
End Sub
And then there is a module that contains the two functions to send an
email to myself whenever a reminder pops up. Any suggestions
Public Function NewAppointmentMail(subject As String)
'Creates and tries to send a new e-mail message.
Dim objNewMail As Outlook.MailItem
Set objNewMail = Application.CreateItem(olMailItem)
objNewMail.subject = subject
objNewMail.Body = "This e-mail message was created automatically
on " & Now
objNewMail.To = "(e-mail address removed)"
If objNewMail.IsConflict = False Then
objNewMail.Send
Else
MsgBox "Conflict: Cannot send mail item."
End If
Set olApp = Nothing
Set objNewMail = Nothing
End Function
Public Function NewTaskMail(subject As String)
'Creates and tries to send a new e-mail message.
Dim objNewMail As Outlook.MailItem
Set objNewMail = Application.CreateItem(olMailItem)
objNewMail.subject = subject
objNewMail.Body = "This e-mail message was created automatically
on " & Now
objNewMail.To = "(e-mail address removed)"
If objNewMail.IsConflict = False Then
objNewMail.Send
Else
MsgBox "Conflict: Cannot send mail item."
End If
Set olApp = Nothing
Set objNewMail = Nothing
End Function
I had this running really smooth when I first put it into outlook...
now after a restart of outlook the code doesnt even execute..... its
like the code is not respoding to any of outlooks events.
Thanks for the help in advance
David Fibingr
(e-mail address removed)
Sub Application_Reminder(ByVal Item As Object)
If TypeOf Item Is AppointmentItem Then
'create subject line
Dim subject1 As String
subject1 = "Appointment Reminder: " & Item.subject
'Call new AppoinmentMail to send email
NewReminders.NewAppointmentMail subject1
End If
If TypeOf Item Is TaskItem Then
'create subject line
Dim subject2 As String
subject2 = "Task Reminder: " & Item.subject
'Call new TaskMail to send email
NewReminders.NewTaskMail subject2
End If
End Sub
And then there is a module that contains the two functions to send an
email to myself whenever a reminder pops up. Any suggestions
Public Function NewAppointmentMail(subject As String)
'Creates and tries to send a new e-mail message.
Dim objNewMail As Outlook.MailItem
Set objNewMail = Application.CreateItem(olMailItem)
objNewMail.subject = subject
objNewMail.Body = "This e-mail message was created automatically
on " & Now
objNewMail.To = "(e-mail address removed)"
If objNewMail.IsConflict = False Then
objNewMail.Send
Else
MsgBox "Conflict: Cannot send mail item."
End If
Set olApp = Nothing
Set objNewMail = Nothing
End Function
Public Function NewTaskMail(subject As String)
'Creates and tries to send a new e-mail message.
Dim objNewMail As Outlook.MailItem
Set objNewMail = Application.CreateItem(olMailItem)
objNewMail.subject = subject
objNewMail.Body = "This e-mail message was created automatically
on " & Now
objNewMail.To = "(e-mail address removed)"
If objNewMail.IsConflict = False Then
objNewMail.Send
Else
MsgBox "Conflict: Cannot send mail item."
End If
Set olApp = Nothing
Set objNewMail = Nothing
End Function
I had this running really smooth when I first put it into outlook...
now after a restart of outlook the code doesnt even execute..... its
like the code is not respoding to any of outlooks events.
Thanks for the help in advance
David Fibingr
(e-mail address removed)