Retrieve the Email address from an automatically generated delivered/read message.

  • Thread starter Thread starter Gordon Filby
  • Start date Start date
G

Gordon Filby

Hi,

does anyone have an idea how to do the subject using VBA? I have copied all
read/delivered messages into a single folder and would like to respond with
a standard message.

Many thanks,

Gordon Filby
 
You will need to use Extended MAPI/CDO 1.21/Redemption to read the message
recipients collection.
Note that the ReportItem object in the Outlook Object Model does not expose
the Recipients collection.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Hallo,

Thanks for the prompt reply.

Is there really no other way, I have no clue about Extended MAPI/CDO
1.21/Redemption.

A typical message looks like this:

Conferma del messaggio inviato a
<[email protected]> alle 24/06/2006 13.19

Il messaggio è stato visualizzato nel computer del destinatario alle
26/06/2006 9.59



and the from line also includes the Email address I need. Is there no way I
can dig it out.? What kind of objects are these messages?



Thanks,



Gordon Filby
 
Using Redemption and assuming that the Folder variable points to an
Outlook.MAPIFolder object that contains the NDRs:

set Items = Folder.Items
set SafeReport = CreateObject("Redemption.SafeReportItem")
for each msg in Items do
if msg.Class =46 Then 'make sure it tis really a report
SafeReport.Item = msg
for i=1 to SafeReport.Recipients.Count
set Recip = SafeReport.Recipients.Item(i)
MsgBox Recip.Address
next
end If
next

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
I'm afraid I don't know anything about Redemption either. What I think I
know is that it was devised to work around the security message "a program
is attempting to send Emails" or similar.

What this seems to me to mean is that if I run an older version of Outlook
(OL2000 - which doesn't have this hindrance) I should not need the
Redemption stuff. Is this correct and, if so, what part of the code below
can be used?

Many thanks again.

Gordon Filby
 
That's just one reason why Redemption was created. Another reason is to
expose the functionality that available in the Outlook Object Model.
The code from my previous post illustrates both: OOM does not expose the
Recipients collection in its Outlook.ReportItem object
(Redemption.SafeReportItem does). Even if it did, it would be blocked.
The script will work in Outlook 98 and up.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
"that available in the Outlook Object Model"
should read
"that was not available in the Outlook Object Model"

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top