+ Reply to Thread
Results 1 to 1 of 1

Importing Email (MailItem) and Read Reciept (ReportItem) into an Excel Spreadsheet

  1. #1
    Registered User
    Join Date
    London, England
    MS-Off Ver
    Excel 2003

    Importing Email (MailItem) and Read Reciept (ReportItem) into an Excel Spreadsheet


    I thought i'd share my solution to anyone else who has had this issue. Below is a code I have written (or rather, hacked together!) which can import data from an outlook folder which contains a mixture of MailItems and ReportItems.

    This code may be useful to you (after modification) if you need to run a report on how many emails have been sent out for example in a company awareness breifing and need to analyse the data of a folder which contains a mixutre of the emails responded to (Email Replies), emails read (read receipts) and emails not read (Not Read Reciept)

    The easy bit with this code is importing data from the Emails (Mailitem), particularly the sendername from the Outlook Exchange Server as this Object has the .sendername Property. The tricky bit was trying to get the same information for a read receipt or any other type of Report Item as they do not have the same .sendername property! The solution was found through using the CDO library and creating a MAPI session in order to draw out the desired property of the Report Item.

    The CDO method of extracting MAPI properties of a reportitem within this code was modified from using code found on the website http://www.cdolive.com/cdo5.htm ("Get the sender information of an Outlook item") so credit for the initial code should go to CDOLive.

    The code below requires the following additonal References to be activated:

    - Microsoft Office Outlook View Control
    - Microsoft Forms 2.0 Object Library
    - Microsoft CDO 1.21 Library

    Please Login or Register  to view this content.
    I hope this helps anyone who has had the same frustrations with this as I have or conversely, if anyone maybe has a more efficient/elegant version of this code which performs the same task then I would be interested to see.


    Last edited by Paul; 06-06-2013 at 05:04 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1