+ Reply to Thread
Results 1 to 3 of 3

Reading Outlook e-mail data is slow

  1. #1
    Valued Forum Contributor
    Join Date
    12-05-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010 & 2013
    Posts
    308

    Reading Outlook e-mail data is slow

    Hi Folks,

    I am reading data from Outlook in to a spreadsheet. At present, I'm only achieving about 1 per second. I have done some experimentation and found that it is only when one starts reading in SenderName, Subject, etc that it really slows down. I assume this is because it is being retrieved from the Exchange server each time I request a piece of information. Is there a quicker method, perhaps retrieving all the data at once?

    My code follows. I have deleted most of the irrelevant code to test the speed issue and was slowly adding it back in. I've highlighted two lines that, when added, really slow the code down. Before these were added, the macro ran 74 e-mails in about 2 seconds. I'm using Office 2007.

    Please Login or Register  to view this content.
    Any advice would be very welcome.

    Best regards, Rob.

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Reading Outlook e-mail data is slow

    You don't have objEmail defined. (So it gets defined as a variant) Try Diming it as a MailItem.
    David
    (*) Reputation points appreciated.

  3. #3
    Valued Forum Contributor
    Join Date
    12-05-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010 & 2013
    Posts
    308

    Re: Reading Outlook e-mail data is slow

    Thanks David.

    I gave it a go and it did improve performance a bit (down to 80 items in 40 seconds). It's still not going particularly quickly, but perhaps that is a limitation of my connection to the Exchange server.

    Best regards, Rob.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Bookmarks

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