Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Count Messages Daily (2002)

    Not sure if this can be done. On a daily routine we get several messages a day where the subject is the same each time. These are usually messages on the Status of certain routines done by a lot of people. Management for some unknown reason now wants us to count the number of messages that are sent each day.

    As we don't delete the messages for a while they are kept in folders named after the subject line. So today, I would go into the "Promotions" folder and count the number of messages with yesterdays date. Does any body know of a way that this can be automated and then sent out (again) in a message to someone or entered into a MS Excel spreadsheet?

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Count Messages Daily (2002)

    I can get the count of today's items in a Folder via VBA with this:

    Activeexplorer.CurrentFolder.Items.Restrict("[Received] > '" & Format(Date, "ddddd h:nn") &"'").Count

    so it can be done. The date can be decremented by 1 day to return the count from yesterday, by 2 for the day before yesterday, etc. How do you want to report it, by an e-mail showing the last 7 days?
    -John ... I float in liquid gardens
    UTC -7ąDS

  3. #3
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Count Messages Daily (2002)

    There are about 10 different folders that we need to keep track of and they are done as a daily task. One problem is that after the message is read, the operator will move it to the correct folder. Being human they are not perfect, so they sometimes move it to the wrong folder.

    How could I get it to search the 10 folders and count the number of messages (depending on the subject line) on a monthly (1st day of the month to send someone a message) routine.

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Count Messages Daily (2002)

    Are also looking for misfiled messages where the subject line is not the same as the folder name, or do you just want a straight count of the last 32 days messages, or both? Are the folders to be read all subfolders of one folder, or are they anywhere in the hierachy under the mailbox or PST? Would you prefer to run the routine separately on each folder or all the applicable folders at once? (The complexity of the code depends on how the folders are structured, and since I don't have your folder structure to test on, you'll have to do some editing of the code anyway.)
    -John ... I float in liquid gardens
    UTC -7ąDS

  5. #5
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Count Messages Daily (2002)

    Yes I am also looking for misfiled messages. There are two main folders that I am working with "Promotion Change Request" and "Mainframe Job Request". The Promotion Change Request folder uses the "Promotion Change Request" and "Promotion Font Request" subject lines. The Mainframe Job Request folder uses the "Mainframe Request for Processing - 2000" subject line.

    Each month we need to fill out a spreadsheet that will show how many messages for each folder and how many for each subject line if the folder contains more than 1 message type, as in the Promotion Change Request. This one contains two different subject lines.

    Attached is an example of the report that is produced.

  6. #6
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Count Messages Daily (2002)

    You are asking quite a lot here. There appear to be more rows in the report than you noted above, I was expecting just two Folders, "Promotion Change Request" and "Promotion Font Request", corresponding to two rows or columns. Do you need this report in Excel, or could it be in the body of an e-mail message like this:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Message Count Report Run 8/12/2004
    Possible Error Items List:
    Message "Blah blah blah" received 8/10/2004 2:48:34 in folder "Promotion Change Request"
    Message "Yada yada" received 8/10/2004 4:15:31 in folder "Promotion Change Request"
    Message "Something else again" received 8/11/2004 4:42:19 in folder "Promotion Change Request"
    Message "This doesn't belong here" received 8/11/2004 4:54:35 in folder "Promotion Font Request"

    Folder: "Promotion Change Request"
    07/13/2004 8
    07/14/2004 3
    07/15/2004 9
    07/16/2004 6
    ...etc
    08/09/2004 5
    08/10/2004 7
    08/11/2004 6
    08/12/2004 1
    "
    -John ... I float in liquid gardens
    UTC -7ąDS

  7. #7
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Count Messages Daily (2002)

    The attachment was just to show what they collect.

    I was/am looking for just two examples and then I would work on doing the rest of them. That way I can learn more about how to do things myself. I don't want to take advantage of someone's help, If I could learn how its done then I can add or remove more entries myself.

    In excel would be an extra bonus but in just a email message it would be fine. In fact just in a email message, I need for them to also learn how to do things. What you have is what I am looking for. BTW, I just found out that the folders are subfolders of the INBOX folder

  8. #8
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Count Messages Daily (2002)

    OK, if you can tolerate them in a message, this may not be so bad (for me <img src=/S/grin.gif border=0 alt=grin width=15 height=15>), and you can use the message contents as a source to Paste to Excel or elsewhere. Are the Folders -direct- subfolders of a -Server Inbox-?
    -John ... I float in liquid gardens
    UTC -7ąDS

  9. #9
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Count Messages Daily (2002)

    Not sure how to answer this question about the folders. I looked at their computer and it just shows

    INBOX
    folder 1
    folder 2
    Sent Items
    etc
    public folders
    folder 3

  10. #10
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Count Messages Daily (2002)

    Whats's the Parent folder of the Inbox called? (see graphic)
    -John ... I float in liquid gardens
    UTC -7ąDS

  11. #11
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Count Messages Daily (2002)

    See attached... hope this is it.

  12. #12
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Count Messages Daily (2002)

    Give the attached a whirl. If it errors, tell me the exact error message it produces (line number, error text, and number). Note the 'instructional' comments in the body of the code, preceded by '.
    -John ... I float in liquid gardens
    UTC -7ąDS

  13. #13
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Count Messages Daily (2002)

    Waht/Where do I attach this to?

  14. #14
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Count Messages Daily (2002)

    Set Tools | Macro Security to Low, Close Outlook and all Outlook windows, reopen Outlook. Press Alt-F11, and you will be in the Outlook Visual Basic Editor (VBE) window. The left side looks & acts like Windows File Explorer and shows the code modules; if you don't have a Module 1, right-click on Project 1, and Insert a Module. Open that module and copy the code text, making sure there are no text wrap errors. Close the VBE, close Outlook, reopen Outlook and set Tools | Macro Security to Medium.

    Select Tools | Macro | Macros | Run, or press Alt-F8, select the macro, and click on Run.

    (You can also use self-cert to digitally sign the Module if you want to avoid the question about "This Outlook session has macros ....)
    -John ... I float in liquid gardens
    UTC -7ąDS

  15. #15
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Count Messages Daily (2002)

    It goes to line 15 - Set collFolders = Outlook
    It goest to MS Visual Basic - Run TIme error '-2147221233(8004010f)':
    The operation failed. An object could not be found.

Page 1 of 2 12 LastLast

Posting Permissions

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