PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Count received mails of yesterday
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Count received mails of yesterday
![]() |
Count received mails of yesterday |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I have a macro counting:
1. nº answered mails yesterday 2. nº pending mails from yesterday Then I concluded that the nº of received mails must have been the sum of 1+2 (or: received mails yesterday = answered mails yesterday + pending mails , error!!!!). The error consist in the fact that the answered mails yesterday could have been received before the day of yesterday!!! So how can I correct this? I already have the macro checking the send mail folder and checking for "send date = yesterday". What I miss is a check for "received date = yesterday" as well? Any tips are greatly welcomed! TIA Martin |
|
|
|
#2 |
|
Guest
Posts: n/a
|
On Tue, 10 Aug 2004, Martin Los wrote:
> So how can I correct this? > I already have the macro checking the send mail folder and > checking for "send date = yesterday". What I miss is a > check for "received date = yesterday" as well? > You can use MAPI to get to the email and then use the ReceivedTime method on the mail item. Regards Lars Roland. |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Dear Lars:
Since I am not used to MAPI programming, do you have any example? TIA Martin >-----Original Message----- >On Tue, 10 Aug 2004, Martin Los wrote: > >> So how can I correct this? >> I already have the macro checking the send mail folder and >> checking for "send date = yesterday". What I miss is a >> check for "received date = yesterday" as well? >> > >You can use MAPI to get to the email and then use the ReceivedTime >method on the mail item. > > >Regards > >Lars Roland. >. > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
What about using MailItem.ReceivedTime from the Outlook object model?
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Martin Los" <anonymous@discussions.microsoft.com> wrote in message news:358a01c47ede$3eed11e0$a501280a@phx.gbl... > Dear Lars: > > Since I am not used to MAPI programming, do you have any > example? > > TIA > > Martin > >-----Original Message----- > >On Tue, 10 Aug 2004, Martin Los wrote: > > > >> So how can I correct this? > >> I already have the macro checking the send mail folder > and > >> checking for "send date = yesterday". What I miss is a > >> check for "received date = yesterday" as well? > >> > > > >You can use MAPI to get to the email and then use the > ReceivedTime > >method on the mail item. > > > > > >Regards > > > >Lars Roland. > >. > > |
|
|
|
#5 |
|
Guest
Posts: n/a
|
Go with Sue's example, it is much easier - heh i did not think of that
one, sorry. Regards. Lars Roland On Tue, 10 Aug 2004, Sue Mosher [MVP-Outlook] wrote: > What about using MailItem.ReceivedTime from the Outlook object model? > > -- > Sue Mosher, Outlook MVP > Author of > Microsoft Outlook Programming - Jumpstart for > Administrators, Power Users, and Developers > http://www.outlookcode.com/jumpstart.aspx > > > "Martin Los" <anonymous@discussions.microsoft.com> wrote in message > news:358a01c47ede$3eed11e0$a501280a@phx.gbl... > > Dear Lars: > > > > Since I am not used to MAPI programming, do you have any > > example? > > > > TIA > > > > Martin > > >-----Original Message----- > > >On Tue, 10 Aug 2004, Martin Los wrote: > > > > > >> So how can I correct this? > > >> I already have the macro checking the send mail folder > > and > > >> checking for "send date = yesterday". What I miss is a > > >> check for "received date = yesterday" as well? > > >> > > > > > >You can use MAPI to get to the email and then use the > > ReceivedTime > > >method on the mail item. > > > > > > > > >Regards > > > > > >Lars Roland. > > >. > > > > > > |
|
|
|
#6 |
|
Guest
Posts: n/a
|
I am afraid the task is a bit more complex. Let me try and
explain. I give an easy example: In the olFolderSentMail I have 20 messages I sent yesterday; 5 messages are "original" messages (= "New" I created and sent them) and 15 are responses (= "Reply" to an answer to a received message in my Inbox). Of those 15 responses I wrote, 12 emails were originally received the same day (=yesterday), but 3 were received before yesterday! Checking messages in olFolderSentMail for ReceivedTime will give me the time the olFolderSentMail received the answered mail. BUT IT WILL NOT TELL ME WHEN I RECEIVED THE ORIGINAL MESSAGE I RESPONDED TO! To check for the date received I guess I should look into the body of the responded message (or does a property exist that tells me the received date of a responded message?). Any ideas? TIA Martin >-----Original Message----- >Go with Sue's example, it is much easier - heh i did not think of that >one, sorry. > >Regards. > >Lars Roland > > >On Tue, 10 Aug 2004, Sue Mosher [MVP-Outlook] wrote: > >> What about using MailItem.ReceivedTime from the Outlook object model? >> >> -- >> Sue Mosher, Outlook MVP >> Author of >> Microsoft Outlook Programming - Jumpstart for >> Administrators, Power Users, and Developers >> http://www.outlookcode.com/jumpstart.aspx >> >> >> "Martin Los" <anonymous@discussions.microsoft.com> wrote in message >> news:358a01c47ede$3eed11e0$a501280a@phx.gbl... >> > Dear Lars: >> > >> > Since I am not used to MAPI programming, do you have any >> > example? >> > >> > TIA >> > >> > Martin >> > >-----Original Message----- >> > >On Tue, 10 Aug 2004, Martin Los wrote: >> > > >> > >> So how can I correct this? >> > >> I already have the macro checking the send mail folder >> > and >> > >> checking for "send date = yesterday". What I miss is a >> > >> check for "received date = yesterday" as well? >> > >> >> > > >> > >You can use MAPI to get to the email and then use the >> > ReceivedTime >> > >method on the mail item. >> > > >> > > >> > >Regards >> > > >> > >Lars Roland. >> > >. >> > > >> >> >> >. > |
|
|
|
#7 |
|
Guest
Posts: n/a
|
A sent message that is a reply contains no property related to the arrival
time of the original message that was replied to, but you are correct that the body of the message would contain that date, assuming you don't delete Outlook's automatic reply header. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Martin Los" <anonymous@discussions.microsoft.com> wrote in message news:3f9a01c47f91$f9ff7370$a501280a@phx.gbl... > I am afraid the task is a bit more complex. Let me try and > explain. I give an easy example: > > In the olFolderSentMail I have 20 messages I sent > yesterday; 5 messages are "original" messages (= "New" I > created and sent them) and 15 are responses (= "Reply" to > an answer to a received message in my Inbox). > > Of those 15 responses I wrote, 12 emails were originally > received the same day (=yesterday), but 3 were received > before yesterday! > > Checking messages in olFolderSentMail for ReceivedTime > will give me the time the olFolderSentMail received the > answered mail. BUT IT WILL NOT TELL ME WHEN I RECEIVED THE > ORIGINAL MESSAGE I RESPONDED TO! > To check for the date received I guess I should look into > the body of the responded message (or does a property > exist that tells me the received date of a responded > message?). > > Any ideas? TIA > > Martin > >-----Original Message----- > >Go with Sue's example, it is much easier - heh i did not > think of that > >one, sorry. > > > >Regards. > > > >Lars Roland > > > > > >On Tue, 10 Aug 2004, Sue Mosher [MVP-Outlook] wrote: > > > >> What about using MailItem.ReceivedTime from the Outlook > object model? > >> > >> "Martin Los" <anonymous@discussions.microsoft.com> > wrote in message > >> news:358a01c47ede$3eed11e0$a501280a@phx.gbl... > >> > Dear Lars: > >> > > >> > Since I am not used to MAPI programming, do you have > any > >> > example? > >> > > >> > TIA > >> > > >> > Martin > >> > >-----Original Message----- > >> > >On Tue, 10 Aug 2004, Martin Los wrote: > >> > > > >> > >> So how can I correct this? > >> > >> I already have the macro checking the send mail > folder > >> > and > >> > >> checking for "send date = yesterday". What I miss > is a > >> > >> check for "received date = yesterday" as well? > >> > >> > >> > > > >> > >You can use MAPI to get to the email and then use the > >> > ReceivedTime > >> > >method on the mail item. |
|
|
|
#8 |
|
Guest
Posts: n/a
|
How to accesing the body of the message I can read in your
book I recently bought Sue. 2 months ago Dmitry Streblechenko said that with Redemption, Extended MAPI or CDO 1.21 it is posible to: 1. read PR_CONVERSATION_INDEX property and find an e-mail in the Sent Items folder with the same value of PR_CONVERSATION_INDEX property plus 5 bytes. 2. read PR_MESSAGE_DELIVERY_TIME and PR_LAST_VERB_EXECUTION_TIME (0x10820040), which last property is what Outlook uses when it displays "You replied on..." or "You forwarded this message on...". How does these extended MAPI properties help me find an answer to my question? I need tipos how to interpret these properties! TIA MArtin >-----Original Message----- >A sent message that is a reply contains no property related to the arrival >time of the original message that was replied to, but you are correct that >the body of the message would contain that date, assuming you don't delete >Outlook's automatic reply header. > >-- >Sue Mosher, Outlook MVP >Author of > Microsoft Outlook Programming - Jumpstart for > Administrators, Power Users, and Developers > http://www.outlookcode.com/jumpstart.aspx > > >"Martin Los" <anonymous@discussions.microsoft.com> wrote in message >news:3f9a01c47f91$f9ff7370$a501280a@phx.gbl... >> I am afraid the task is a bit more complex. Let me try and >> explain. I give an easy example: >> >> In the olFolderSentMail I have 20 messages I sent >> yesterday; 5 messages are "original" messages (= "New" I >> created and sent them) and 15 are responses (= "Reply" to >> an answer to a received message in my Inbox). >> >> Of those 15 responses I wrote, 12 emails were originally >> received the same day (=yesterday), but 3 were received >> before yesterday! >> >> Checking messages in olFolderSentMail for ReceivedTime >> will give me the time the olFolderSentMail received the >> answered mail. BUT IT WILL NOT TELL ME WHEN I RECEIVED THE >> ORIGINAL MESSAGE I RESPONDED TO! >> To check for the date received I guess I should look into >> the body of the responded message (or does a property >> exist that tells me the received date of a responded >> message?). >> >> Any ideas? TIA >> >> Martin >> >-----Original Message----- >> >Go with Sue's example, it is much easier - heh i did not >> think of that >> >one, sorry. >> > >> >Regards. >> > >> >Lars Roland >> > >> > >> >On Tue, 10 Aug 2004, Sue Mosher [MVP-Outlook] wrote: >> > >> >> What about using MailItem.ReceivedTime from the Outlook >> object model? >> >> >> >> "Martin Los" <anonymous@discussions.microsoft.com> >> wrote in message >> >> news:358a01c47ede$3eed11e0$a501280a@phx.gbl... >> >> > Dear Lars: >> >> > >> >> > Since I am not used to MAPI programming, do you have >> any >> >> > example? >> >> > >> >> > TIA >> >> > >> >> > Martin >> >> > >-----Original Message----- >> >> > >On Tue, 10 Aug 2004, Martin Los wrote: >> >> > > >> >> > >> So how can I correct this? >> >> > >> I already have the macro checking the send mail >> folder >> >> > and >> >> > >> checking for "send date = yesterday". What I miss >> is a >> >> > >> check for "received date = yesterday" as well? >> >> > >> >> >> > > >> >> > >You can use MAPI to get to the email and then use the >> >> > ReceivedTime >> >> > >method on the mail item. > > >. > |
|
|
|
#9 |
|
Guest
Posts: n/a
|
You will need to read these properies from the messages in both the Inbox
and Sent Item folders to to find out how the messages are related. Did you look at the messages with MdbView or OutlookSpy (click IMessage) to ply with these properties? Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Martin Los" <anonymous@discussions.microsoft.com> wrote in message news:3e3b01c47fa7$5f0781d0$a301280a@phx.gbl... > How to accesing the body of the message I can read in your > book I recently bought Sue. > > 2 months ago Dmitry Streblechenko said that with > Redemption, Extended MAPI or CDO 1.21 it is posible to: > > 1. read PR_CONVERSATION_INDEX property and find an e-mail > in the Sent Items folder with the same value of > PR_CONVERSATION_INDEX property plus 5 bytes. > > 2. read PR_MESSAGE_DELIVERY_TIME and > PR_LAST_VERB_EXECUTION_TIME (0x10820040), which last > property is what Outlook uses when it displays "You > replied on..." or "You forwarded this message on...". > > How does these extended MAPI properties help me find an > answer to my question? > I need tipos how to interpret these properties! > > TIA > > MArtin > > >-----Original Message----- > >A sent message that is a reply contains no property > related to the arrival > >time of the original message that was replied to, but you > are correct that > >the body of the message would contain that date, assuming > you don't delete > >Outlook's automatic reply header. > > > >-- > >Sue Mosher, Outlook MVP > >Author of > > Microsoft Outlook Programming - Jumpstart for > > Administrators, Power Users, and Developers > > http://www.outlookcode.com/jumpstart.aspx > > > > > >"Martin Los" <anonymous@discussions.microsoft.com> wrote > in message > >news:3f9a01c47f91$f9ff7370$a501280a@phx.gbl... > >> I am afraid the task is a bit more complex. Let me try > and > >> explain. I give an easy example: > >> > >> In the olFolderSentMail I have 20 messages I sent > >> yesterday; 5 messages are "original" messages (= "New" I > >> created and sent them) and 15 are responses (= "Reply" > to > >> an answer to a received message in my Inbox). > >> > >> Of those 15 responses I wrote, 12 emails were originally > >> received the same day (=yesterday), but 3 were received > >> before yesterday! > >> > >> Checking messages in olFolderSentMail for ReceivedTime > >> will give me the time the olFolderSentMail received the > >> answered mail. BUT IT WILL NOT TELL ME WHEN I RECEIVED > THE > >> ORIGINAL MESSAGE I RESPONDED TO! > >> To check for the date received I guess I should look > into > >> the body of the responded message (or does a property > >> exist that tells me the received date of a responded > >> message?). > >> > >> Any ideas? TIA > >> > >> Martin > >> >-----Original Message----- > >> >Go with Sue's example, it is much easier - heh i did > not > >> think of that > >> >one, sorry. > >> > > >> >Regards. > >> > > >> >Lars Roland > >> > > >> > > >> >On Tue, 10 Aug 2004, Sue Mosher [MVP-Outlook] wrote: > >> > > >> >> What about using MailItem.ReceivedTime from the > Outlook > >> object model? > >> >> > >> >> "Martin Los" <anonymous@discussions.microsoft.com> > >> wrote in message > >> >> news:358a01c47ede$3eed11e0$a501280a@phx.gbl... > >> >> > Dear Lars: > >> >> > > >> >> > Since I am not used to MAPI programming, do you > have > >> any > >> >> > example? > >> >> > > >> >> > TIA > >> >> > > >> >> > Martin > >> >> > >-----Original Message----- > >> >> > >On Tue, 10 Aug 2004, Martin Los wrote: > >> >> > > > >> >> > >> So how can I correct this? > >> >> > >> I already have the macro checking the send mail > >> folder > >> >> > and > >> >> > >> checking for "send date = yesterday". What I > miss > >> is a > >> >> > >> check for "received date = yesterday" as well? > >> >> > >> > >> >> > > > >> >> > >You can use MAPI to get to the email and then use > the > >> >> > ReceivedTime > >> >> > >method on the mail item. > > > > > >. > > |
|
|
|
#10 |
|
Guest
Posts: n/a
|
Unfortunately the 30days trial period has already passed
for OutlookSpy, which I have used with great fun! How can I get Mdbview if I do not posses the Exchange 5.5 cd? Is it a free program that can be found on Internet? Does anybody know whether addins exist that measure things like "average speed of answer" and "service level" (= nº emails answered within time limit of say 24hours / total nº emails received in 24 hours)? I work in a service call center and I want to find out this information to asses the quality that we provide to our customers. TIA Martin >-----Original Message----- >You will need to read these properies from the messages in both the Inbox >and Sent Item folders to to find out how the messages are related. >Did you look at the messages with MdbView or OutlookSpy (click IMessage) to >ply with these properties? > >Dmitry Streblechenko (MVP) >http://www.dimastr.com/ >OutlookSpy - Outlook, CDO >and MAPI Developer Tool > > >"Martin Los" <anonymous@discussions.microsoft.com> wrote in message >news:3e3b01c47fa7$5f0781d0$a301280a@phx.gbl... >> How to accesing the body of the message I can read in your >> book I recently bought Sue. >> >> 2 months ago Dmitry Streblechenko said that with >> Redemption, Extended MAPI or CDO 1.21 it is posible to: >> >> 1. read PR_CONVERSATION_INDEX property and find an e- >> in the Sent Items folder with the same value of >> PR_CONVERSATION_INDEX property plus 5 bytes. >> >> 2. read PR_MESSAGE_DELIVERY_TIME and >> PR_LAST_VERB_EXECUTION_TIME (0x10820040), which last >> property is what Outlook uses when it displays "You >> replied on..." or "You forwarded this message on...". >> >> How does these extended MAPI properties help me find an >> answer to my question? >> I need tipos how to interpret these properties! >> >> TIA >> >> MArtin >> >> >-----Original Message----- >> >A sent message that is a reply contains no property >> related to the arrival >> >time of the original message that was replied to, but you >> are correct that >> >the body of the message would contain that date, assuming >> you don't delete >> >Outlook's automatic reply header. >> > >> >-- >> >Sue Mosher, Outlook MVP >> >Author of >> > Microsoft Outlook Programming - Jumpstart for >> > Administrators, Power Users, and Developers >> > http://www.outlookcode.com/jumpstart.aspx >> > >> > >> >"Martin Los" <anonymous@discussions.microsoft.com> wrote >> in message >> >news:3f9a01c47f91$f9ff7370$a501280a@phx.gbl... >> >> I am afraid the task is a bit more complex. Let me try >> and >> >> explain. I give an easy example: >> >> >> >> In the olFolderSentMail I have 20 messages I sent >> >> yesterday; 5 messages are "original" messages (= "New" I >> >> created and sent them) and 15 are responses (= "Reply" >> to >> >> an answer to a received message in my Inbox). >> >> >> >> Of those 15 responses I wrote, 12 emails were originally >> >> received the same day (=yesterday), but 3 were received >> >> before yesterday! >> >> >> >> Checking messages in olFolderSentMail for ReceivedTime >> >> will give me the time the olFolderSentMail received the >> >> answered mail. BUT IT WILL NOT TELL ME WHEN I RECEIVED >> THE >> >> ORIGINAL MESSAGE I RESPONDED TO! >> >> To check for the date received I guess I should look >> into >> >> the body of the responded message (or does a property >> >> exist that tells me the received date of a responded >> >> message?). >> >> >> >> Any ideas? TIA >> >> >> >> Martin >> >> >-----Original Message----- >> >> >Go with Sue's example, it is much easier - heh i did >> not >> >> think of that >> >> >one, sorry. >> >> > >> >> >Regards. >> >> > >> >> >Lars Roland >> >> > >> >> > >> >> >On Tue, 10 Aug 2004, Sue Mosher [MVP-Outlook] wrote: >> >> > >> >> >> What about using MailItem.ReceivedTime from the >> Outlook >> >> object model? >> >> >> >> >> >> "Martin Los" <anonymous@discussions.microsoft.com> >> >> wrote in message >> >> >> news:358a01c47ede$3eed11e0$a501280a@phx.gbl... >> >> >> > Dear Lars: >> >> >> > >> >> >> > Since I am not used to MAPI programming, do you >> have >> >> any >> >> >> > example? >> >> >> > >> >> >> > TIA >> >> >> > >> >> >> > Martin >> >> >> > >-----Original Message----- >> >> >> > >On Tue, 10 Aug 2004, Martin Los wrote: >> >> >> > > >> >> >> > >> So how can I correct this? >> >> >> > >> I already have the macro checking the send >> >> folder >> >> >> > and >> >> >> > >> checking for "send date = yesterday". What I >> miss >> >> is a >> >> >> > >> check for "received date = yesterday" as well? >> >> >> > >> >> >> >> > > >> >> >> > >You can use MAPI to get to the email and then use >> the >> >> >> > ReceivedTime >> >> >> > >method on the mail item. >> > >> > >> >. >> > > > >. > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

