Sum up overtime hours for my sent mails over one year

Q

Qiubang Li

Hi Everyone,

I have some experience in vba programming but a newbie in outlook
programming. Can anyone help me to write a code in outlook to calculate how
many hours I have worked for my boss for the past one year. My working hours
are 9:00AM - 5:00PM. Everyday I sent an daily progress update to my boss.
Sometimes it's at 5:30PM or 6:00PM. It means I have worked half an hour or 1
hour overtime at that particular day. The whole idea is to go to the sent
folder, check all those mails sent to my boss, and sum up all those hours
with mails sent after 5:00PM. Can anyone give me some idea how to do it?
Many thanks.
 
M

Michael Bauer

Am Sat, 4 Mar 2006 11:09:35 +1100 schrieb Qiubang Li:

Here is a sample how to restrict a folder´s content on a specified date
range:
http://www.outlookcode.com/d/finddate.htm

You could add the subject to the filter so that the result contains only
those mails sent to your boss (with a specified subject) in a year.

Then loop through that result and check each item´s SentOn property: If it
contains a "pm" and Hour(YourItem.SentOn) > 5 then it´s a match.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top