Helllo
I found the thread below on how to set up Outlook to alert me if an email with a specified subject is not recevied by an expected time....but....when i try to set it up i get the alerts no matter what.
I am trying to set it up for an email that comes in every 10 minutes. Also I would rather the email be deleted after it comes in and updates the alert (every 10 minutes will fill up my box fast). Anyone have any ideas on whyi can't get this to work? I set the subject and the task with a reminder as stated in the original code.
Thanks!
alf8kitty
--------------------------
---
original code/post:
Title: Create An Outlook Alert - Non Received E-Mails
Bookmark:
Question: How do I create an alert for E-Mails that I do not receive by a certain time.
I am administering a report delivery system (Microstrategy Narrowcast Server); Error notification is poor - The only way I know 100% whether a report was delivered or not is by checking for non-received E-Mails
I send out hundreds of reports per week and I get BCC'ed on them all; I then go down a checklist manually to determine if a report was sent or not sent
How can I set up an alert to advise me when a report is not delivered by a specific time?
I can place a string or a GUID in the body to subject line to denote uniqueness; How do I scan for somthing like this?
Is this at all possible?
12.16.2005 at 09:21AM PST, ID: 15499120
Rank: Genius
Is this what you were looking for?
Yes No
BlueDevilFan:
Greetings, acampoma.
I think I can do this with an Outlook macro. Here are the steps I think this'd require.
1. Outlook starts and creates a task, with reminder, to watch for the email.
2. If the subject email does not arrive by the teim the task deadline hits, then the task reminder will pop up.
3. If the subject email does arrive, then it resets the task's due date/time to when the next message should arrive.
If that logic sounds right, and if using a macro is acceptable, then I can put the coded together and get it posted.
Cheers!
12.22.2005 at 07:50PM PST, ID: 15539831
Is this what you were looking for?
Yes No
acampoma:
Sorry for the late reply - Yes; a macro would be fine
12.27.2005 at 01:30PM PST, ID: 15558418
Rank: Genius
Is this what you were looking for?
Yes No
BlueDevilFan:
The code appears below. Follow these instructions to set it up.
1. Open Outlook.
2. Click Tools->Macro->Visual Basic Editor. You should now be looking at a window titled Microsoft Visual Basic - VbaProject.OTM. Maximize the window, if not already maximized.
3. In the left-hand pane, expand Project1, then expand Microsoft Office Outlook Objects and click on ThisOutlookSession.
4. Copy the code below and paste it into the large right-hand pane.
5. Scroll through the code and find the comment lines, they should appear in green. Some of the comments are just that, comments, but others include instructions on making changes to the code that will have to be done for it to work for you. Make those changes.
6. Save the code by clicking on the diskette icon on the toolbar, or by clicking File->Save VbaProject.OTM
7. Close the code window.
8. Click Tools->Macro->Security. You should now be looking at a dialog-box titled Security.
9. If you're not on the Security Level tab, click it.
10. By Default I expect the security level will be at High. You'll need to decrease this to Medium for the code to work.
11. Exit Outlook.
12. Launch Outlook.
13. As Outlook starts a dialog box titled Security Warning should appear. It'll tell you that ThisOutlookSession contains macros and ask you if you want to enable or disable macros. For the code to run you'll have to select Enable Macros.
14. Create a task with the same subject text that appears in the subroutine called olkInbox_ItemAdd.
15. Set the Date Due field to the date when the first itteration of the message should arrive.
16. Turn the task reminder on and set it to remind you at the time when the first message should arrive by.
17. Save the task.
Here's how this works.
1. The task we created in steps 14-17 will fire a reminder at the date/time when the next message is due.
2. The code watches the Inbox for new messages arriving. As each message arrives it checks to see if it has the required subject.
3. If the message has the required subject, then it runs the ManageWatcherTask subroutine which changes the reminder date/time setting it x hours into the future (the amount of time before the next message should arrive). As long as the messages continue to arrive within the set time frame the taks reminder will never fire as it's constatnly being pushed into the future.
4. If the newly arrived message does not contain the right subject, then it's ignored.
5. If no message containing the key subject line is received before the reminder date/time, then a standard task reminder pops up onscreen letting you know that the message is overdue.
'Macro Begins Here
Public WithEvents olkInbox As Outlook.Items
Private Sub Application_Quit()
Set olkInbox = Nothing
End Sub
Private Sub Application_Startup()
Set olkInbox = Application.GetNamespace("
MAPI").Get
DefaultFol
der(olFold
erInbox).I
tems
End Sub
Private Sub olkInbox_ItemAdd(ByVal Item As Object)
If Item.Class = olMail Then
'Change Watcher Update to the subject text you want to key on
If Item.Subject = "Watcher Update" Then
'Change 1 to the number of hours you want to wait for the next message to arrive
ManageWatcherTask Now + 1
Item.UnRead = False
Item.Save
End If
End If
End Sub
Sub ManageWatcherTask(datDateD
ue As Date)
Dim olkTaskFolder As Outlook.Items, _
olkTask As Outlook.TaskItem
Set olkTaskFolder = Application.GetNamespace("
MAPI").Get
DefaultFol
der(olFold
erTasks).I
tems
'Change Watcher Task to whatever task name you want to use
Set olkTask = olkTaskFolder.Find("[Subje
ct] = 'Watcher Task'")
If Not IsNothing(olkTask) Then
olkTask.ReminderTime = datDateDue
olkTask.ReminderSet = True
Else
Set olkTask = Application.CreateItem(olT
askItem)
With olkTask
.DueDate = datDateDue
'Chagne Watcher Task to match the task name used above
.Subject = "Watcher Task"
.ReminderTime = datDateDue
.ReminderSet = True
End With
End If
olkTask.Save
Set olkTask = Nothing
End Sub
'Macro Ends Here
Start Free Trial