This can certainly be done (using Outlook VBA -- not VBScript, which is only needed for code on Outlook forms). A few questions:
1. How do you define "daily received emails"? Are they gathered together into a specific folder, for example?
2. Does "the same subject" mean a specific subject (if so, what is it?) or do you want counts of the number of emails for each subject?
3. What is the email to which the report should be sent?
4. What format is the report -- plain text in body of email, HTML text in body of email, an attached text file, or something else?
nschwend
ASKER
Hi Helen,
sorry for the delay....
I try to answer as clearer as possible:
1. I've a folder with Archived_Alerts where arrives all the archived issues from the monitoring system. I wish the code looks at this folder for the report
2. the monitor system normally send an email with a subject like this when there is a problem:
Check Last Transcoded - PROBLEM
and a subject like this when the problem has been solved
Check Last Transcoded - OK
3. I wish that the report email counts how many email I received in this folder the last day and (if possible) how much for each type of issue
4. this is completely indifferent. I use it as an internal report to have a global summary.
hope it helps.
thank you very much
best regards
Nick
Helen Feddema
Do you have a list of the problem types? That would make it easier to check for the number of each type.
I have the procedure done except for the part that counts the number of messages per subject. This would be much easier to do in Access than in Outlook -- is that a possibility? If not, I can save the subjects as Outlook NoteItems. In that case, could they be saved in the default Notes folder?
Hi Helen,
first of all THANK YOU for your time and the code you provided...
I think you let something that parses the notes instead of the mailbox folder... it takes the only note I have...
I've a stupid question: How can I do to execute it at midnight?
thank you a lot!
best regards
Nick
Helen Feddema
The code parses the mail messages in the folder you select, and then saves the subjects for the selected day as notes. Then it parses the notes and counts how many messages there are for each subject (ritms is a collection of mail messages for the selected date, and ritms2 is a collection of mail messages with the current subject).
To execute it at midnight, it would have to be converted into a VBScript and run from the Windows Scheduler. I am not sure that all the VBA code could be translated into VBScript, which is a more limited dialect of VB. Or (if you have Access), it might be possible to convert the code into Access VBA (only minor modifications would be needed), then run it from an Access macro, which could be called from a VBScript. Let me know if that would work.
Perhaps there is no need to run it exactly at midnight. It processes a certain day's messages only, so it doesn't really matter when it is run.
1. How do you define "daily received emails"? Are they gathered together into a specific folder, for example?
2. Does "the same subject" mean a specific subject (if so, what is it?) or do you want counts of the number of emails for each subject?
3. What is the email to which the report should be sent?
4. What format is the report -- plain text in body of email, HTML text in body of email, an attached text file, or something else?