![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
I am using Outlook 2007. In the NewMail event, is it possible to identify if the MailItem is a read receipt? Could someone help me? Thanks in advance. |
Ads |
#2
|
|||
|
|||
![]()
Look for a MessageClass property that starts with "REPORT.IPM.Note" and ends
with "IPNRN" to identify a read receipt. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Sanya Ibrahim" Sanya wrote in message news ![]() Hi, I am using Outlook 2007. In the NewMail event, is it possible to identify if the MailItem is a read receipt? Could someone help me? Thanks in advance. |
#3
|
|||
|
|||
![]()
Thanks for the reply.
Well, I am rather new to OutLook vba. Is it possible for you to give a sample / example code? Sanya "Ken Slovak - [MVP - Outlook]" wrote: Look for a MessageClass property that starts with "REPORT.IPM.Note" and ends with "IPNRN" to identify a read receipt. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Sanya Ibrahim" Sanya wrote in message news ![]() Hi, I am using Outlook 2007. In the NewMail event, is it possible to identify if the MailItem is a read receipt? Could someone help me? Thanks in advance. . |
#4
|
|||
|
|||
![]()
Well, for one thing I wouldn't use NewMail(). It doesn't tell you what was
received and it misses things. I'd use NewMailEx() instead, which supplies a list of items received as a list of EntryID's. Always use F2 to open the Object Browser and that lets you see all methods, properties and events for all Outlook items. Then use the Help to see code samples. In the case of Application.NewMailEx() the code sample shows how to get an item from the collection of EntryID's. That item (mai) can be used thusly to check the MessageClass: If ((Left(mai.MessageClass, Len("REPORT.IPM.Note")) = _ "REPORT.IPM.Note") And (Right(mail.MessageClass, _ Len("IPNRN")) = "IPNRN")) Then ' this is a read receipt, do whatever End If You should also become familiar with the www.outlookcode.com Web site, that has code samples for almost anything Outlook related. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Sanya Ibrahim" wrote in message ... Thanks for the reply. Well, I am rather new to OutLook vba. Is it possible for you to give a sample / example code? Sanya |
#5
|
|||
|
|||
![]()
Well, I tried it. I am getting into a strange situation wherein:-
(a) The EntryCollection argument has string values (b) I split the EntryCollection string on "," and use the individual EntryID strings to retrieve the mail Items (c) However, the GetItemFromID(EntryID) returns nothing. The EntryID argument is not null and the value does not correspond to the new inmail. What to do? "Ken Slovak - [MVP - Outlook]" wrote: Well, for one thing I wouldn't use NewMail(). It doesn't tell you what was received and it misses things. I'd use NewMailEx() instead, which supplies a list of items received as a list of EntryID's. Always use F2 to open the Object Browser and that lets you see all methods, properties and events for all Outlook items. Then use the Help to see code samples. In the case of Application.NewMailEx() the code sample shows how to get an item from the collection of EntryID's. That item (mai) can be used thusly to check the MessageClass: If ((Left(mai.MessageClass, Len("REPORT.IPM.Note")) = _ "REPORT.IPM.Note") And (Right(mail.MessageClass, _ Len("IPNRN")) = "IPNRN")) Then ' this is a read receipt, do whatever End If You should also become familiar with the www.outlookcode.com Web site, that has code samples for almost anything Outlook related. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Sanya Ibrahim" wrote in message ... Thanks for the reply. Well, I am rather new to OutLook vba. Is it possible for you to give a sample / example code? Sanya . |
#6
|
|||
|
|||
![]()
That is the correct procedure, and it has worked that way for me in the
past. Are you using a StoreID argument? I'd try that and see if it helps. You can get Inbox using NameSpace.GetDefaultFolder(olFolderInbox) and use the StoreID property from that object. Are you getting any exceptions or just nothing? -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Sanya Ibrahim" wrote in message ... Well, I tried it. I am getting into a strange situation wherein:- (a) The EntryCollection argument has string values (b) I split the EntryCollection string on "," and use the individual EntryID strings to retrieve the mail Items (c) However, the GetItemFromID(EntryID) returns nothing. The EntryID argument is not null and the value does not correspond to the new inmail. What to do? |
#7
|
|||
|
|||
![]()
I am using a storeID arguement. I am not getting any exception but the
MaiItem is showing as nothing. Sanya |
#8
|
|||
|
|||
![]()
No idea. Similar code works here. Step the code in the debugger and see if
you can find out that way what the problem is. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Sanya Ibrahim" wrote in message ... I am using a storeID arguement. I am not getting any exception but the MaiItem is showing as nothing. Sanya |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Rule to identify a from address | Anthony Chater | Outlook - General Queries | 4 | November 2nd 07 02:07 PM |
Rule to identify a from address | Anthony Chater | Outlook - General Queries | 4 | November 1st 07 10:48 PM |
How can I identify which profile is in use | cmgarnett | Outlook - Installation | 4 | May 3rd 07 08:08 AM |
not able to identify the attachment | [email protected] | Outlook Express | 2 | November 11th 06 03:53 AM |
How to identify identity of sender? | hringley | Outlook - Using Contacts | 1 | May 16th 06 02:58 PM |