A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Identify Read Recepits



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 16th 10, 06:11 AM posted to microsoft.public.outlook.program_vba
Sanya Ibrahim
external usenet poster
 
Posts: 1
Default Identify Read Recepits

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  
Old February 16th 10, 03:08 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Identify Read Recepits

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  
Old February 17th 10, 04:31 AM posted to microsoft.public.outlook.program_vba
Sanya Ibrahim[_2_]
external usenet poster
 
Posts: 3
Default Identify Read Recepits

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  
Old February 17th 10, 03:14 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Identify Read Recepits

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  
Old February 19th 10, 04:23 PM posted to microsoft.public.outlook.program_vba
Sanya Ibrahim[_2_]
external usenet poster
 
Posts: 3
Default Identify Read Recepits

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  
Old February 19th 10, 05:29 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Identify Read Recepits

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  
Old February 20th 10, 05:45 AM posted to microsoft.public.outlook.program_vba
Sanya Ibrahim[_2_]
external usenet poster
 
Posts: 3
Default Identify Read Recepits

I am using a storeID arguement. I am not getting any exception but the
MaiItem is showing as nothing.

Sanya
  #8  
Old February 22nd 10, 02:59 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Identify Read Recepits

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 04:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.