+ Reply to Thread
Results 1 to 2 of 2

Find outlook emails that match ID numbers in Excel

  1. #1
    Registered User
    Join Date
    05-11-2019
    Location
    Leicester, England
    MS-Off Ver
    Office 365
    Posts
    52

    Find outlook emails that match ID numbers in Excel

    Hi everyone,

    I have a list of ID numbers in excel and when we have sent an email it gets marked with the sent date and when we get the reply we mark it again. Due to user error some get missed so I've to get excel to search through outlook Sent box to see if an email had been sent.
    I now need to do this for the Inbox however there are many subfolders that the email could be hiding in and i only know how to search the main inbox, could anybody help me in getting it to also go through every subfolder?

    Also is there a way to make this quicker as it did take 3 days to complete!!! I came across maybe using "items.Restrict" not sure if that would work for what i need it for and if it would be quicker - https://docs.microsoft.com/en-us/off...items.restrict I did try however i couldn't understand/get it to work.

    The below code goes through outlook Sent box to find the emails that have been sent to change it to inbox i would change "olFolderSentMail" to "olFolderInbox" but that only looks in the inbox not sub folders.

    Please Login or Register  to view this content.
    Any help would be greatly appreciated especially if it makes the process quicker seeing as i was hoping to complete it by Monday

    Thank you for your help
    Martin
    Last edited by mtwa1990; 01-09-2021 at 04:49 AM.

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Find outlook emails that match ID numbers in Excel

    if you look at the dependency links, one nest after the other, in the MS URL you posted:

    https://docs.microsoft.com/en-us/off...items.restrict

    https://docs.microsoft.com/en-us/off.../outlook.items

    https://docs.microsoft.com/en-us/off...k-item-objects

    you eventually read this in the last link:
    The following are the item-level objects defined in the Outlook object model:
    .......
    .......
    .......
    and nowhere on that page do you read *anything* about folders. Thus, you can't use it, more than likely. the only thing close is this:
    Please Login or Register  to view this content.
    but you are not looking for content inside an email message itself. you want to search messages inside a folder. So, if you're not aware, the protocol called MAPI is widely used in email clients, outlook specifically. if you look here:

    https://www.google.com/search?q=vba+...ubfolders+mapi

    you'll find your answer, more than likely. there was also someone here recently that was doing the same thing and did it mostly themselves. they already had the MAPI being used in their own code. check it out:

    https://www.excelforum.com/outlook-f...ime-error.html

    and my help starts here:

    https://www.excelforum.com/outlook-f...ml#post5442273

    MAPI is what is called a namespace. that word is very popular, but in outlook the concept is severely outdated. it means something totally different now to corporate professionals.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 09-22-2020, 10:57 AM
  2. [SOLVED] Macro to Draft Outlook Emails and Attach files in Emails
    By arun.sj in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-17-2020, 05:48 AM
  3. [SOLVED] Excel VBA Outlook needing to add to and CC to outlook emails
    By flevojax in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-28-2018, 01:04 PM
  4. Track Outlook Emails - sent emails in Excel
    By baluraipur in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-06-2015, 09:18 AM
  5. [SOLVED] Sending Outlook emails from Excel; Limits to three emails only?
    By BPSJACK in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-29-2013, 06:53 AM
  6. Replies: 0
    Last Post: 02-09-2012, 12:30 PM
  7. Send outlook emails with message in cells to individual emails associated with them
    By abinayan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-21-2011, 06:11 AM

Tags for this Thread

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