+ Reply to Thread
Results 1 to 4 of 4

Count Number Of Emails by Sender & Date With VBA

  1. #1
    Registered User
    Join Date
    07-04-2019
    Location
    CANADA
    MS-Off Ver
    oFFICE 365
    Posts
    2

    Count Number Of Emails by Sender & Date With VBA

    Hello,

    The objective is to find the total/count of emails from Sender on Monthly basis. The below code works good which retrieves Date/Time by Sender and their count. The only problem is to display the SenderName on the worksheet. I'm not sure if i've to use 2 dictionaries or not, and if yes no knowledge about how to work around it.

    Thank you in advance!
    Attached Files Attached Files
    Last edited by mohana_09877; 09-24-2020 at 09:14 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: Count Number Of Emails by Sender & Date With VBA

    well one thing that doesn't make sense here is that you are dec'ing a MAPI namespace and you're not even using it.

    but, that point aside, you are apparently using the dictionary object to get your outlook info. and that's fine. personally I don't use it, ever. and you are getting the data you already have by getting the keys. so, is there anything you can possibly get from these articles?

    https://docs.microsoft.com/en-us/off...tionary-object

    https://docs.microsoft.com/en-us/off...lp/keys-method

    and you obviously know how to point to a folder in any given PST, considering you wrote this line:
    Please Login or Register  to view this content.
    what you can do, I believe, is loop through your mail items and get the sender of each by capturing the sender property. see here:

    https://docs.microsoft.com/en-us/off...ailitem.sender

  3. #3
    Registered User
    Join Date
    07-04-2019
    Location
    CANADA
    MS-Off Ver
    oFFICE 365
    Posts
    2

    Re: Count Number Of Emails by Sender & Date With VBA

    Thank you.

    I've declared MAPI namespace and not used it for objFolder because the overall logic goes by looping through all folders and subfolders and I left that part out here as it was not necessary.

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

    Re: Count Number Of Emails by Sender & Date With VBA

    nice. so do you need more assistance?

+ 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: 0
    Last Post: 12-08-2019, 05:30 PM
  2. [SOLVED] VBA Count Emails in outlook mail box and enter count and oldest email date into excel cell
    By fireguy7 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-24-2018, 11:04 AM
  3. [SOLVED] Count Emails in a folder by Date
    By jomili in forum Outlook Programming / VBA / Macros
    Replies: 8
    Last Post: 01-30-2018, 10:39 AM
  4. [SOLVED] Count emails in Outlook before set date
    By Stromming in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-19-2016, 06:51 AM
  5. Outlook Rules - moving emails from a sender in a specific address book
    By UKRyan in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 12-22-2014, 11:12 AM
  6. Send Emails once expiry date is reached, and generate report based on emails sent
    By demonicscorpion in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-18-2014, 05:36 AM
  7. Count of emails by folder and received date
    By TypicalDru in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-16-2012, 04:48 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