Consulting

Results 1 to 3 of 3

Thread: PRINT EMAILS WHERE SUBJECT MATCHES CELLS IN EXCEL

  1. #1
    VBAX Regular
    Joined
    Feb 2018
    Posts
    70
    Location

    PRINT EMAILS WHERE SUBJECT MATCHES CELLS IN EXCEL

    Hi Everyone,

    I am looking for some help this may not be possible but I hope some has an idea! Basically I receive thousands of emails (outlook 2013) with subject "SF Bill sent to accounts - 123456" the 6 digits are different for every email, every email has an excel attachment which I need to print.

    Is it possible that if I have a list in excel (2013), containing the subject of the emails that I want to print, that this can be done with a vba?

    I basically want the list in excel with a list of subjects, I want these to print the attachment of the corresponding email in outlook.

    Many thanks in advance.

    Lee
    Last edited by leemcder; 02-23-2018 at 03:43 AM.

  2. #2
    I can't give you the exact solution that you're looking for, but how about looking at it this way....

    You said that you receive thousands of emails with the subject of "SF Bill sent to accounts - 123456", and the 6 digits change every time. This makes it unique.

    How about, setting up a macro in Outlook to automatically save these attachments to a local folder. The macro will trigger when you receive an email with the subject line that contains "
    SF Bill sent to accounts -"....
    You could also add in another rule if these emails come from a specific email address.

    So every time, you receive one of these emails, the attachment is saved to "C:\SF Bills"

    The macro can automatically rename this file to your 6 digits... That's if the excel file name is always different, but not unique.

    Then.... You can set up another macro in Excel, to look at your list of subjects, and then look for the file in your local drive... if it exists, then print it.

    That's probably the way I'd go about it.

  3. #3
    VBAX Regular
    Joined
    Feb 2018
    Posts
    70
    Location
    Thanks Ashley, this sounds like a good solution! I am pretty new to VBA so I will give it a try and cross my finger.

    Quote Originally Posted by ashleyuk1984 View Post
    I can't give you the exact solution that you're looking for, but how about looking at it this way....

    You said that you receive thousands of emails with the subject of "SF Bill sent to accounts - 123456", and the 6 digits change every time. This makes it unique.

    How about, setting up a macro in Outlook to automatically save these attachments to a local folder. The macro will trigger when you receive an email with the subject line that contains "
    SF Bill sent to accounts -"....
    You could also add in another rule if these emails come from a specific email address.

    So every time, you receive one of these emails, the attachment is saved to "C:\SF Bills"

    The macro can automatically rename this file to your 6 digits... That's if the excel file name is always different, but not unique.

    Then.... You can set up another macro in Excel, to look at your list of subjects, and then look for the file in your local drive... if it exists, then print it.

    That's probably the way I'd go about it.

Posting Permissions

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