?
Solved

Associating appointments to contacts as in Outlook 2003

Posted on 2008-11-05
43
Medium Priority
?
373 Views
Last Modified: 2013-11-25
Some years ago, I had a programmer create an add-in to Outlook 2003 for me that generated an appointment reminder email that is sent out automatically.

In Outlook 2003, the process of creating a follow-up email started by opening the appointment, scrolling to the bottom of the appointment page where the "Contact" field could be selected.  That step gave the add-in access to the contact's email address.

Although you might think that using the "scheduling" feature of Outlook might accomplish the same thing, it did not.

Although the add-in mostly works in Outlook 2007, since the "Contact" field isn't available within an appointment form, I can't adjust old appointments nor set up new ones to receive a followup.

I think what I need is to be able to have the Outlook Appointment form adjusted to show the "Contact" field, but I do not know how to do that.

Any help?
0
Comment
Question by:coachjim
  • 22
  • 21
43 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 22886939
Hi, coachjim.

Do the reminders go to you or someone else?
0
 
LVL 2

Author Comment

by:coachjim
ID: 22895345
The reminders to to the contact I'm reminding, thus the need to link the appointment to their contact information and email address.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 22895459
Is the contact you're reminding the person(s) the appointment is with?
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
LVL 2

Author Comment

by:coachjim
ID: 22896163
Yes.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 22896858
Then how about a macro that does the same thing, only instead of using the now absent contact link it sends to the meeting atendees?
0
 
LVL 2

Author Comment

by:coachjim
ID: 22901782
It sounds like that would work fine.

FYI:   With my add-in, I can set the number of days ahead of the meeting the email goes out, and I use 7.  Also, it is set to run automatically, and I've set 8:00 as the time to trigger that.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 22909508
Ok, here's the first cut on this.  This checks the appointments a fixed number of days out.  Right now that's 7, matching your add-in.  For each item it finds the script applies the following logic in deciding whether to send a reminder

1.  Are you the organizer?  If not, disregard.
2.  Is the item a meeting?  A meeting requires other participants.  If not, disregard.

If the item passes both tests, then a reminder message is created.  That message is addressed to all the required and optional recipients.  The addressees are entered on the BCC line so they don't see each other.  

For testing purposes the reminder message is displayed not sent.  If this works the way you want, then I'll add the code and instructions for running this on a schedule.
Sub SendReminder()
    'Change this to the number of days to look ahead'
    Const DAYSAHEAD = 7
    Dim olkFolder As Outlook.MAPIFolder, _
        olkItems As Outlook.Items, _
        olkItem As Outlook.AppointmentItem, _
        olkMsg As Outlook.MailItem, _
        olkParticipant As Outlook.Recipient, _
        olkRecipient As Outlook.Recipient, _
        datStart As Date, _
        datEnd As Date
    datStart = DateAdd("d", DAYSAHEAD, Date) & " 12:01 AM"
    datEnd = DateAdd("n", 1438, datStart)
    Set olkFolder = Session.GetDefaultFolder(olFolderCalendar)
    Set olkItems = olkFolder.Items.Restrict("[Start] > '" & Format(datStart, "ddddd h:nn AMPM") & "' AND [Start] < '" & Format(datEnd, "ddddd h:nn AMPM") & "'")
    olkItems.Sort "[Start]"
    olkItems.IncludeRecurrences = True
    For Each olkItem In olkItems
        If olkItem.Organizer = Session.CurrentUser Then
            If olkItem.MeetingStatus = olMeeting Then
                Set olkMsg = Application.CreateItem(olMailItem)
                With olkMsg
                    'Change the subject line as desired'
                    .Subject = "Meeting Reminder"
                    'Change the message body as desired'
                    .Body = "Please don't forget our meeting one week from today"
                    For Each olkParticipant In olkItem.Recipients
                        Select Case olkParticipant.Type
                            Case olRequired, olOptional
                                Set olkRecipient = .Recipients.Add(olkParticipant.Address)
                                olkRecipient.Type = olBCC
                        End Select
                    Next
                    'Change this command to Send when ready to go live'
                    .Display
                End With
            End If
        End If
    Next
    Set olkFolder = Nothing
    Set olkItems = Nothing
    Set olkItem = Nothing
    Set olkMsg = Nothing
    Set olkRecipient = Nothing
End Sub

Open in new window

0
 
LVL 2

Author Comment

by:coachjim
ID: 22943645
I have been super busy and have not been able to test your code.  I hope to do that soon and just wanted to give you this note that I'm still engaged but distracted.  Sorry for this delay.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 22944696
Thanks for the update.  No problem, I'll be here whenever you're ready.
0
 
LVL 2

Author Comment

by:coachjim
ID: 23395005
Blue Devil Fan:

OK, I'm getting back to this project!  I've taken your code and put it in as a macro.  At first, when I ran it, I got a message that it needed to be enabled, but I've set my security settings to wide open and I no longer get that message.

Now when I run the macro, I don't see anything happening.

Any suggestions?

Jim
0
 
LVL 76

Expert Comment

by:David Lee
ID: 23401371
When you open Outlook are you prompted to enable macros?
0
 
LVL 2

Author Comment

by:coachjim
ID: 23401860
BDF:

I had set my macro security to the lowest level where all macros would just run.  I've now set it so that I do get the warning and prompt to enable macros.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 23404880
Ok, then we need to know if the macro is running.  Add the following line of code between lines 11 and 12 of the existing code, then run it again and let me know what happens.

    MsgBox "Macro fired"
0
 
LVL 2

Author Comment

by:coachjim
ID: 23410445
I got the message box and here's where I put it:

    datStart = DateAdd("d", DAYSAHEAD, Date) & " 12:01 AM"
    datEnd = DateAdd("n", 1438, datStart)
    MsgBox "Macro fired"
    Set olkFolder = Session.GetDefaultFolder(olFolderCalendar)
0
 
LVL 76

Expert Comment

by:David Lee
ID: 23416652
Let's try this.  Set a breakpoint on line 12.  To set a breakpoint, click on line 12 and press the F9 key.  The line will turn red.  Run the macro.  When execution hits line 12 you'll be switched to the debugger.  Pressing F8 will execute the highlighted line of code and move to the next line.  Step through the code one line at a time.  This will allow you to see the path the code is taking.  You can also mouse over any variable name and see its value.
0
 
LVL 2

Author Comment

by:coachjim
ID: 23435844
What is this macro supposed to do?
0
 
LVL 76

Expert Comment

by:David Lee
ID: 23436075
Sorry, I don't know how I can explain it any better than I did in this post 22909508 above.
0
 
LVL 2

Author Comment

by:coachjim
ID: 23436165
Thanks.  I forgot about that.  OK, the reason it didn't appear to be working was because I didn't have my test appointments set up correctly.  It looks like it is working (note, I'm not saying "now").

Could the reminder include the meeting location and time (including at least a reference to the time zone that's being shown as the time)?

Thanks, and thanks for "waiting" for me.

Jim
0
 
LVL 76

Expert Comment

by:David Lee
ID: 23442187
Hi, Jim.

You're welcome.

All changes made in the version below.

No problem.
Sub SendReminder()
    'Change this to the number of days to look ahead'
    Const DAYSAHEAD = 7
    Dim olkFolder As Outlook.MAPIFolder, _
        olkItems As Outlook.Items, _
        olkItem As Outlook.AppointmentItem, _
        olkMsg As Outlook.MailItem, _
        olkParticipant As Outlook.Recipient, _
        olkRecipient As Outlook.Recipient, _
        datStart As Date, _
        datEnd As Date
    datStart = DateAdd("d", DAYSAHEAD, Date) & " 12:01 AM"
    datEnd = DateAdd("n", 1438, datStart)
    Set olkFolder = Session.GetDefaultFolder(olFolderCalendar)
    Set olkItems = olkFolder.Items.Restrict("[Start] > '" & Format(datStart, "ddddd h:nn AMPM") & "' AND [Start] < '" & Format(datEnd, "ddddd h:nn AMPM") & "'")
    olkItems.Sort "[Start]"
    olkItems.IncludeRecurrences = True
    For Each olkItem In olkItems
        If olkItem.Organizer = Session.CurrentUser Then
            If olkItem.MeetingStatus = olMeeting Then
                Set olkMsg = Application.CreateItem(olMailItem)
                With olkMsg
                    'If you change the body format to anything other than HTML, then you need to change the body too."
                    .BodyFormat = olFormatHTML
                    'Change the subject line as desired'
                    .Subject = "Meeting Reminder"
                    'Change the message body as desired'
                    .HTMLBody = "Please don't forget our meeting one week from today.<br><br>" _
                        & "From: " & olkItem.Start & "<br>" _
                        & "To: " & olkItem.End & "<br>" _
                        & "Timezone: " & olkItem.StartTimeZone & "<br>" _
                        & "Location: " & olkItem.Location
                    For Each olkParticipant In olkItem.Recipients
                        Select Case olkParticipant.Type
                            Case olRequired, olOptional
                                Set olkRecipient = .Recipients.Add(olkParticipant.Address)
                                olkRecipient.Type = olBCC
                        End Select
                    Next
                    'Change this command to Send when ready to go live'
                    .Display
                End With
            End If
        End If
    Next
    Set olkFolder = Nothing
    Set olkItems = Nothing
    Set olkItem = Nothing
    Set olkMsg = Nothing
    Set olkRecipient = Nothing
End Sub

Open in new window

0
 
LVL 2

Author Comment

by:coachjim
ID: 23503298
OK, one last question.  Is there a way to automate this?  I'm guessing not as that could lead to repetitive emails being sent to people.  Any thoughts on this one?

Otherwise, thanks for your help AND for your patience.

Jim
0
 
LVL 76

Expert Comment

by:David Lee
ID: 23514970
"Is there a way to automate this?"
Automate it as in run the script automatically say once per day?  Yes, that's possible in a couple of ways.  First, we could set it up to run once a day from Outlook.  Of course Outlook would have to be running at the designated time for this to work.  Second, we could set this to run from a scheduled task.  The computer would have to be logged in with an account that has access to Outlook for the code to work.
0
 
LVL 2

Author Comment

by:coachjim
ID: 23515221
Cool.  I'd vote for having it run once daily from Outlook.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 23521838
Ok, here's the code for doing this.  Follow these instructions to use it.

1.  Open Outlook
2.  Click Tools->Macro->Visual Basic Editor
3.  If not already exapnded, expand Microsoft Outlook Objects and click on ThisOutlookSession
4.  Copy the code below and paste it into the right-hand pane of the VB Editor
5.  Edit the code as necessary.  I included comments where things can/need to be changed
6.  Click the diskette icon on the toolbar to save the changes we've made
7.  Close the VB Editor
8.  Exit Outlook
9.  Start Outlook
10.  A dialog-box will pop up saying that ThisOutlookSession contains a macro and asking if you want to allow it to run.  Say yes.
11.  Create a task
12.  Set the Subject
13.  Check Reminder and set the date and time to the time you want the reminder messages sent
14.  Make the task recurring
15.  Save the task and you're ready to go

How this works
1.  The macro monitors reminder events.
2.  When a reminder fires (lots of things can trigger a reminder), the code checks to see if the reminder is for a Task.  If it is, then it next checks to see if the subject equals the subject it is watching for.  If it is, then the macro cancels the reminder and runs the code that sends the reminder messages.  If any of the conditions listed are false, then nothing happens at all.

Note
Reminders don't fire exactly on time.  Sometimes they fire very close to when they should, other times it may be several minutes after when they should have fired that they actually fire.  I suspect it has something to do with how busy both Outlook and the computer are when the reminder comes due.  Be patient, the reminder will fire and trigger the code.

That's it.  Give it a try and let me know if you have questions or run into problems.
Private WithEvents olkReminders As Outlook.Reminders
 
Private Sub Application_Quit()
    Set olkReminders = Nothing
End Sub
 
Private Sub Application_Startup()
    Set olkReminders = Application.Reminders
End Sub
 
Private Sub olkReminders_ReminderFire(ByVal ReminderObject As Reminder)
    Dim olkItem As Outlook.TaskItem
    If TypeName(ReminderObject.Item) = "TaskItem" Then
        Set olkItem = ReminderObject.Item
        'Change the subject on the next line to match the subject of your task'
        If olkItem.Subject = "My Reminder Subject" Then
            olkItem.ReminderSet = False
            olkItem.Save
            SendReminder
        End If
    End If
    Set olkItem = Nothing
End Sub

Open in new window

0
 
LVL 2

Author Comment

by:coachjim
ID: 23560028
I think I've followed your instructions, but I'm not sure if the automatic part isn't working.

I set up a recurring task "Reminder."  It runs daily.
Every time I open Outlook, it brings up the warning window for a macro.
In your VBA code, I changed the line to read:  If olkItem.Subject = "Reminder" Then...
so that it's using the correct task name.

I'll do some more testing and get back to you.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 23560850
The warning is normal.  That's because of Outlook security.  I'll explain ways around that once I know everything is working.
0
 
LVL 2

Author Comment

by:coachjim
ID: 23566005
Yea, I understand the warning is normal, I just wanted to document the things that I figured would give you a sense of what I was doing.

I have yet to see the routine send any email reminders on its own.  On the other hand, any time I change the reminder time, reminders get sent.  Thus, in changing that time three times today, people got three reminders.

We'll see what happens tomorrow.

Jim
0
 
LVL 76

Expert Comment

by:David Lee
ID: 23566181
Got it.  If you want to see if the automatic part is working, insert this line of code after line 12

    MsgBox "Reminder code fired"

When the code fires a dialog-box will pop up letting you know the code has fired.
0
 
LVL 2

Author Comment

by:coachjim
ID: 23592565
The automated routine did run this morning, and I don't know that I've ever seen it run on it's own.  I did manually run the reminder macro and it generated three reminders, so today's failure wasn't because there was nothing to send.

Its failure to run over the weekend was because I'd originally set the task to only run M-F.

I also have a question:  during testing, I've left my PC on with Outlook running.  What happens if the machine or Outlook is not turned on at the time the task should trigger?  That is, if the task is to run at 8:30 am and I don't turn on the PC until 10:00 am, should it still run?

In addition to this, could you send me the line I would add to the reminder body so that it shows me who I'm meeting with?  Although I can see the person's email address in the BCC box, sometimes those don't tell me who the person is.

Here's the latest code as I've copied it:
Private WithEvents olkReminders As Outlook.Reminders
 
Private Sub Application_Quit()
    Set olkReminders = Nothing
End Sub
 
Private Sub Application_Startup()
    Set olkReminders = Application.Reminders
End Sub
 
Private Sub olkReminders_ReminderFire(ByVal ReminderObject As Reminder)
    Dim olkItem As Outlook.TaskItem
    MsgBox "Reminder code fired"
    If TypeName(ReminderObject.Item) = "TaskItem" Then
        Set olkItem = ReminderObject.Item
        'Change the subject on the next line to match the subject of your task'
        If olkItem.Subject = "Reminder" Then
            olkItem.ReminderSet = False
            olkItem.Save
            SendReminder
        End If
    End If
    Set olkItem = Nothing
End Sub
0
 
LVL 76

Expert Comment

by:David Lee
ID: 23596774
"That is, if the task is to run at 8:30 am and I don't turn on the PC until 10:00 am, should it still run?"
It should.  The reminder should still be triggered and that's what runs the code.

"could you send me the line I would add to the reminder body so that it shows me who I'm meeting with"
Add the following line of code after line 36 of SendReminder

olkItem.Body = olkItem.Body & olkParticipant.Address & vbLF
0
 
LVL 2

Author Comment

by:coachjim
ID: 23601126
First, I put that line in as shown below.  So far, I haven't seen any additional information showing up in the reminder:
                    .HTMLBody = "Remember, we meet one week from today.<br><br>" _
                        & "From: " & olkItem.Start & "<br>" _
                        & "To: " & olkItem.End & "<br>" _
                        & "Timezone: " & olkItem.StartTimeZone & "<br>" _
                        & "Location: " & olkItem.Location
                    For Each olkParticipant In olkItem.Recipients
                        Select Case olkParticipant.Type
                            Case olRequired, olOptional
                                Set olkRecipient = .Recipients.Add(olkParticipant.Address)
                                olkRecipient.Type = olBCC
                                olkItem.Body = olkItem.Body & olkParticipant.Address & vbLf
                        End Select
                    Next

Second, I opened the Reminder Task and noticed that the Reminder box wasn't checked, so I checked it.  When I closed it, the pop-up came up saying the task had run, and I could find reminders waiting to go out in the outbox.

Later, I noticed the Reminder Task was shown in red with a due date of 2/02.  I checked the completed box over and over until the due date shows as tomorrow.

So now it looks like it is working, although it looks like I need to check the task as completed for it to run in the future.

Does this make sense?
0
 
LVL 76

Expert Comment

by:David Lee
ID: 23605808
My mistake.  I used the wrong object.  It should be

    olkMsg.HTMLBody = olkMsg.HTMLBody & "<br>" & olkParticipant.Address

Yes, that does makes sense for a recurring task.  The next one won't generate until the last one has been marked as done.  Add this line of code

    olkItem.Complete = True

after line 17 of the subroutine olkReminders_ReminderFire.  That'll mark the task complete allowing the next iteration to be created.
0
 
LVL 2

Author Comment

by:coachjim
ID: 23622432
I had some trouble this morning getting the task to run.  It finally did run, after I futzed with some of the tasks details, and I'm not sure what I did that got it to work.

I've attached an image of the task details as they are right now.  Does all that look good?
Task-Details.gif
0
 
LVL 76

Expert Comment

by:David Lee
ID: 23622471
Yep, looks fine.  I'm not sure I'd called it "Reminder", but that's a personal thing.   I'd use something more descriptive like "Run Reminder Macro".  It's immaterial though so long as the task name matches the name in code.

What was the problem getting the task to run?  Are you saying that the reminder is firing and the task isn't running?  Or is it that the reminder isn't firing?
0
 
LVL 2

Author Comment

by:coachjim
ID: 23622788
I have no problem manually triggering the reminder emails by running that macro directly.

The problem has been getting the Task to fire.

One thing I changed this morning was a discrepancy between the due date and reminder date within the task.  The due date shown 2/12 while the reminder date showed 2/19.  I changed the 2/19 to be 2/12.  Later, I saw the task had fired, but by then I'd futzed with other things so I'm not sure what change I made that made the difference.

One possible issue was an appointment where I'd invited someone and then removed them without canceling the meeting.  Only when I ran the macro directly did I see the error message about needing at least one invitee.  I fixed that problem, ran the macro directly again, and it worked.  As above, later I saw the task had fired but couldn't be sure why.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 23648237
I've used this approach to run a task in a number of other answers and I've used it myself, so I know the process works.  The task has to run when the reminder fires unless

1.  The code failed to initialize.
2.  The reminder failed to fire.  This could happen if the reminder was not set, was cleared early, or for some reason Outlook failed to fire reminders.
3.  After initializing the code failed for some reason.

In the snippet please post the code as you have it now.  I'll add a few lines to it that will track what the code is doing and we'll see if we can narrow down what's going on.
0
 
LVL 2

Author Comment

by:coachjim
ID: 23650320
Below is the code as requested.  Also, I've again attached an image of the task's details.  It had not run by itself.  I noticed it had not run Saturday or Sunday so I checked those as completed.  Next, I noticed the reminder box was not checked, so I checked that, closed it, and it ran.  The image shows the tasks details after it's fired for today.  You'll notice the next date is tomorrow's, but again the reminder box is not checked.


Sub AddUDP(Item As Outlook.MailItem)
    Dim olkUDP As Object
    'Create and set the date field
    'Change the field name MyDate on the following line as desired
    Set olkUDP = Item.UserProperties.Item("MyDate")
    If TypeName(olkUDP) = "Nothing" Then
        Set olkUDP = Item.UserProperties.Add("MyDate", olText, True, olText)
    End If
    'Change the formatting on the following line as desired
    olkUDP.Value = Format(Item.ReceivedTime, "mm/dd/yyyy")
   
    'Create and set the time field
    'Change the field name MyTime on the following line as desired
    Set olkUDP = Item.UserProperties.Item("MyTime")
    If TypeName(olkUDP) = "Nothing" Then
        Set olkUDP = Item.UserProperties.Add("MyTime", olText, True, olText)
    End If
    'Change the formatting on the following line as desired
    olkUDP.Value = Format(Item.ReceivedTime, "hh:nn:ss")
   
    'Save the changes
    Item.Save
    Set olkUDP = Nothing
End Sub

Sub SendReminder()
    'Change this to the number of days to look ahead'
    Const DAYSAHEAD = 7
    Dim olkFolder As Outlook.MAPIFolder, _
        olkItems As Outlook.Items, _
        olkItem As Outlook.AppointmentItem, _
        olkMsg As Outlook.MailItem, _
        olkParticipant As Outlook.Recipient, _
        olkRecipient As Outlook.Recipient, _
        datStart As Date, _
        datEnd As Date
    datStart = DateAdd("d", DAYSAHEAD, Date) & " 12:01 AM"
    datEnd = DateAdd("n", 1438, datStart)
    Set olkFolder = Session.GetDefaultFolder(olFolderCalendar)
    Set olkItems = olkFolder.Items.Restrict("[Start] > '" & Format(datStart, "ddddd h:nn AMPM") & "' AND [Start] < '" & Format(datEnd, "ddddd h:nn AMPM") & "'")
    olkItems.Sort "[Start]"
    olkItems.IncludeRecurrences = True
    For Each olkItem In olkItems
        If olkItem.Organizer = Session.CurrentUser Then
            If olkItem.MeetingStatus = olMeeting Then
                Set olkMsg = Application.CreateItem(olMailItem)
                With olkMsg
                    'If you change the body format to anything other than HTML, then you need to change the body too."
                    .BodyFormat = olFormatHTML
                    'Change the subject line as desired'
                    .Subject = "Meeting Reminder"
                    'Change the message body as desired'
                    .HTMLBody = "Remember, we meet one week from today.<br><br>" _
                        & "From: " & olkItem.Start & "<br>" _
                        & "To: " & olkItem.End & "<br>" _
                        & "Timezone: " & olkItem.StartTimeZone & "<br>" _
                        & "Location: " & olkItem.Location & "<br>" _
                        & "<br><br>" & "Meeting with: "
                    For Each olkParticipant In olkItem.Recipients
                        Select Case olkParticipant.Type
                            Case olRequired, olOptional
                                Set olkRecipient = .Recipients.Add(olkParticipant.Address)
                                olkRecipient.Type = olBCC
                                olkMsg.HTMLBody = olkMsg.HTMLBody & "<br>" & olkParticipant.Name
                        End Select
                    Next
                    'Change this command to Send when ready to go live'
                    .Send
                    '.Display
                End With
            End If
        End If
    Next
    Set olkFolder = Nothing
    Set olkItems = Nothing
    Set olkItem = Nothing
    Set olkMsg = Nothing
    Set olkRecipient = Nothing
End Sub

Task-Details.gif
0
 
LVL 76

Expert Comment

by:David Lee
ID: 23650560
How about the code from post #23592565?  Are you using it?  If so, then I need it to unless it's unchanged from that post.

Concerning the screen shot, are you saying that the reminder was checked but isn't now, or it was never checked?
0
 
LVL 2

Author Comment

by:coachjim
ID: 23650690
First, I'm saying the reminder was checked and isn't now.

Second, here's the code you requested:

Private WithEvents olkReminders As Outlook.Reminders
 
Private Sub Application_Quit()
    Set olkReminders = Nothing
End Sub
 
Private Sub Application_Startup()
    Set olkReminders = Application.Reminders
End Sub
 
Private Sub olkReminders_ReminderFire(ByVal ReminderObject As Reminder)
    Dim olkItem As Outlook.TaskItem
    MsgBox "Reminder code fired"
    If TypeName(ReminderObject.Item) = "TaskItem" Then
        Set olkItem = ReminderObject.Item
        'Change the subject on the next line to match the subject of your task'
        If olkItem.Subject = "Reminder" Then
            olkItem.ReminderSet = False
            olkItem.Complete = True
            olkItem.Save
            SendReminder
        End If
    End If
    Set olkItem = Nothing
End Sub
0
 
LVL 2

Author Comment

by:coachjim
ID: 23671189
Given the notion "when in doubt, reboot," I deleted the existing task and created a new one.  

It seems to be working just fine.  I'm ready to click the "accept as solution" button, but I thought I'd check with you first as you were working on one last tweak.

Are we done?
0
 
LVL 76

Accepted Solution

by:
David Lee earned 2000 total points
ID: 23675238
The last tweak was to halp identify what was going on.  If it's working, then there's no need for that.  My vote is to stick a fork in it.
0
 
LVL 2

Author Closing Comment

by:coachjim
ID: 31513512
I am so very pleased to have the functionality of reminding appointment contacts of upcoming appointments and to have that within Outlook as opposed to an add-in.  Thank you for your help and your patience.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 23675625
Thanks and you're welcome.  I'm happy I was able to help out.
0
 
LVL 2

Author Comment

by:coachjim
ID: 23740989
I don't know if you'll get this question, since this one is closed now, but since I deleted the task that runs the macro that generates the reminder email, the new one works perfectly except for the fact that I have to open the task and check the box for "reminder."  If I don't do that, nothing happens.  What should I change to get that to work again.  Below is the task code as it stands right now:

Private WithEvents olkReminders As Outlook.Reminders Private Sub Application_Quit()    Set olkReminders = NothingEnd Sub Private Sub Application_Startup()    Set olkReminders = Application.RemindersEnd Sub Private Sub olkReminders_ReminderFire(ByVal ReminderObject As Reminder)    Dim olkItem As Outlook.TaskItem    MsgBox "Reminder code fired"    If TypeName(ReminderObject.Item) = "TaskItem" Then        Set olkItem = ReminderObject.Item        'Change the subject on the next line to match the subject of your task'        If olkItem.Subject = "ReminderTask" Then            olkItem.ReminderSet = False            olkItem.Complete = True            olkItem.Save            SendReminder        End If    End If    Set olkItem = NothingEnd Sub
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you looking for the options available for exporting EDB files to PST? You may be confused as they are different in different Exchange versions. Here, I will discuss some options available.
Mailbox Corruption is a nightmare every Exchange DBA wishes he never has. Recovering from it can be super-hectic if not entirely futile. And though techniques like the New-MailboxRepairRequest cmdlet have been designed to help with fixing minor corr…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question