+ Reply to Thread
Results 1 to 4 of 4

how to scan all incoming email messages for a specific subject line

  1. #1
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    how to scan all incoming email messages for a specific subject line

    so i have this procedure that does one thing, and that is to print to the immediate window the subject line of a selected item. works great. now i need code to make it scan all incoming emails. here is the code that works:

    Please Login or Register  to view this content.
    here is code that doesn't work, found on the net. according to the OP it should scan and display all info:

    Please Login or Register  to view this content.
    can someone create a boilerplate that scan's incoming subject lines?

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: how to scan all incoming email messages for a specific subject line

    This code works for me. What do you mean by "doesn't work"?

    • Does the code run?
    • Does it run but do nothing?
    • Does it produce error messages? If so, what do the messages say?
    • Does it produce unexpected/wrong results? If so, how do the results differ from what you expect?
    • Does it hang?


    What module did you put the code in? Did you restart Outlook or manually run Application_Startup to test this?

    This code must be in the ThisOutlookSession module. The sub Application_Startup must run first to activate the event handler. It will run automatically when Outlook starts, or you can run it explicitly.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: how to scan all incoming email messages for a specific subject line

    Also, what do you want to scan for, and what do you want to happen? It might be easier to create an Outlook rule.

  4. #4
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: how to scan all incoming email messages for a specific subject line

    cant create rule, need this to be a procedure. so i got the following code to work (probably cause i saved it and reloaded):

    Please Login or Register  to view this content.

    so i think this is solved as i can successfully scan the subject line for PO's
    Last edited by dmcgov; 09-19-2019 at 01:09 PM.

+ 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. [SOLVED] Export Subject Line from specific email to specific excel spreadsheet
    By ShakJames in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 09-12-2016, 03:55 PM
  2. Automatically delete sent messages that have a specific subject
    By Bukovnik in forum Outlook Programming / VBA / Macros
    Replies: 1
    Last Post: 08-06-2016, 04:23 PM
  3. [SOLVED] Autoforward incoming emails with specific words in subject.
    By jflores80 in forum Outlook Programming / VBA / Macros
    Replies: 9
    Last Post: 12-16-2015, 04:09 PM
  4. Hyperlinks - email - subject line - etc
    By Youtalk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-17-2012, 03:41 PM
  5. Add cell value to email subject line
    By shariq1989 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-02-2012, 01:28 PM
  6. Tab Name in Email Subject Line
    By dagindi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-20-2010, 02:37 PM
  7. Changing subject line in email
    By tanyhart in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-07-2006, 11:34 AM

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