Identify Read Recepits

Status
Not open for further replies.
S

Sanya Ibrahim

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.
 
Look for a MessageClass property that starts with "REPORT.IPM.Note" and ends

with "IPNRN" to identify a read receipt.

"Sanya Ibrahim" <Sanya Ibrahim> wrote in message

news:DA1472BA-391C-4563-9B69-28D21C3E01EE@microsoft.com...
> 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.
>
 
Thanks for the reply.

Well, I am rather new to OutLook vba. Is it possible for you to give a

sample / example code?

Sanya
wrote:


> Look for a MessageClass property that starts with "REPORT.IPM.Note" and ends
> with "IPNRN" to identify a read receipt.

> >

>

> "Sanya Ibrahim" <Sanya Ibrahim> wrote in message
> news:DA1472BA-391C-4563-9B69-28D21C3E01EE@microsoft.com...
> > 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.
> >


> .
>
 
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.

"Sanya Ibrahim" <SanyaIbrahim> wrote in message

news:0ABE7D91-1393-4B70-A5E7-A3200E894522@microsoft.com...
> Thanks for the reply.
> Well, I am rather new to OutLook vba. Is it possible for you to give a
> sample / example code?
> Sanya
 
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?
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.

> >

>

> "Sanya Ibrahim" <SanyaIbrahim> wrote in message
> news:0ABE7D91-1393-4B70-A5E7-A3200E894522@microsoft.com...
> > Thanks for the reply.
> > Well, I am rather new to OutLook vba. Is it possible for you to give a
> > sample / example code?
> > Sanya


> .
>
 
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?

"Sanya Ibrahim" <SanyaIbrahim> wrote in message

news:89F22C39-01A7-4F79-99C6-2E03B5EA0BFD@microsoft.com...
> 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?
 
I am using a storeID arguement. I am not getting any exception but the

MaiItem is showing as nothing.

Sanya
 
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.

"Sanya Ibrahim" <SanyaIbrahim> wrote in message

news:5E8DDA27-BC43-42C9-9322-6DDE746BD848@microsoft.com...
> I am using a storeID arguement. I am not getting any exception but the
> MaiItem is showing as nothing.

> Sanya
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
I Identify Number of email messages opened Outlook VBA and Custom Forms 7
S VBA to identify a specific email and copy the attachment from it to the network Outlook VBA and Custom Forms 4
M Best way to identify/designate contacts in incoming emails? Using Outlook 4
makinmyway How can I easily identify and delete from my contacts defunct email addresses? Using Outlook 2
G How can I identify in VBA if the current window is an item or a folder? Using Outlook 3
S Identify weekend from daily RecurrencePattern Outlook VBA and Custom Forms 2
H Better way of writing Macro? Identify multiple types of attachmen Outlook VBA and Custom Forms 5
D How to identify a mail item from a public folder in MS Outlook Outlook VBA and Custom Forms 5
S Correct way to Identify is Mail is opened in Edit Mode Outlook VBA and Custom Forms 1
J Increase read pane font size, but NOT image size? Using Outlook 3
J Read Outlook Form fields Outlook VBA and Custom Forms 3
B Inconsistent handling of message read/unread status by Outlook Using Outlook 3
S E-mails marked as read turn back to unread after a couple of seconds Using Outlook 1
M Cannot read the calendar Using Outlook 9
Z Outlook 365 delete reminder you can’t make change to contents of this-read only folder Using Outlook 4
A Inbox didn't got read Outlook VBA and Custom Forms 0
e_a_g_l_e_p_i Is it possible it set the fonts used to read incoming mail Using Outlook 25
R seperate read layout to design in outlook 2016..Help!! Outlook VBA and Custom Forms 3
N Disable Auto Read Receipts sent after using Advanced Find Using Outlook 4
DoctorJellybean Outlook 365 doesn't always mark emails as read Using Outlook 3
N Separate Read Layout Editing Outlook VBA and Custom Forms 0
A Read and Write to Text File Outlook VBA and Custom Forms 1
L Email Read and Delete Outlook VBA and Custom Forms 4
A Separate Read Layout Outlook VBA and Custom Forms 4
M Making Subject field writable (disable Read Only) Outlook VBA and Custom Forms 2
M How can I determine which user read an email Exchange Server Administration 4
Diane Poremsky Mark Sent Items as Read After Copying with a Rule Using Outlook 0
Diane Poremsky Edit and Save Outlook's Read-Only Attachments Using Outlook 0
Rupert Dragwater Some mailboxes show deleted items as not read Using Outlook 5
K cant read email or open attachement Using Outlook 0
R Reply marks read message as unread Using Outlook 1
T Outlook 2013 either fails to mark messages as read or marks them as read, then un-marks them. Using Outlook 1
Mary B VBscript: Need to copy every email to a folder & mark that copy as read Outlook VBA and Custom Forms 5
Mary B Outlook 2013: Rule for copying new email to folder & marking that copy as read Using Outlook 1
M Sorting messages by read/unread status Using Outlook 8
C Mark all incoming emails as read Outlook VBA and Custom Forms 3
FirefIy Marking message read only if replied to the message or Ctrl+Q. Possible? Using Outlook 1
A give User Read Only access to secondary mailbox in Exchange 2010 via AD Exchange Server Administration 1
M How do I mark emails already received as read when I get a second, different email based on subject? Outlook VBA and Custom Forms 3
JR Ryan Outlook marks all as "Read" issue Exchange Server Administration 2
R Cannot read Chinese message after import Using Outlook 2
T Saving Outlook 2010 email with attachments but read the email without Outlook Using Outlook 2
M Oh please read---> Extracting email web leads on to excel spread sheet Using Outlook 3
S Outlook Custom form - selecting text in read page Using Outlook 0
C In need of VBA code to read / parse HTML - Outlook emails Using Outlook 0
A Can't read my mails if they are on a folder... Using Outlook 0
M Unable to read HTML Using Outlook 2
J Cannot read incoming emails Using Outlook 2
P Custom field is read only Using Outlook 1
C (Read, not read) receipt "subject" problem Using Outlook 8

Similar threads

Back
Top