none
outlook rule forward email with a specific value in attachments RRS feed

  • Question

  • Hi Team, 

    I've seen your answers and i found them amazing!

    This is my problem:

    I would like to know if you can create an  "always on" VBA that can forward emails with a specific value (such as a word like 'dog') in attachments (the attachments are .xls and .csv) to an anddress.

    Could the VBA work like a rule?

    I've seen an answer with a similar problem, however the VBA below search for a value and then save the file in a local path:

    https://social.msdn.microsoft.com/Forums/en-US/68409524-9b5e-4ac4-aeb8-f595dff31260/in-outlook-how-can-i-use-vba-to-search-through-xls-attachments-in-my-inbox-for-specific-values?forum=isvvba

    I hope this will help

    Thank you in advance for your assistance

    Gabriele

    Wednesday, June 10, 2015 10:40 AM

All replies

  • I'm not totally sure about the 'always on' requirement, but maybe this will work for you.

    http://www.codeproject.com/Articles/59270/Forwarding-Outlook-emails-to-another-account-in-an

    As the author says, the Macro runs when you're not at your computer.  I don't think it's a good idea to have VBA running all the time in the background.  Maybe for a short period of time it's ok.  Eventually, something like that will cause a lot of problems for you, not to mention slowing down your machine.  It's probably a better idea to fire off the code once per hour, or setup some kind of timing routine.


    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Wednesday, June 10, 2015 2:18 PM
  • The short answer is yes. You can do this from a rule that evaluates messages as they arrive and processes them accordingly.

    When you say 'xls' files, do you always mean Excel 97-2003 XLS format, or do you include XLSX format also?

    The bottleneck is the searching the attachment files, so let's find exactly what we are dealing with before establishing a way to deal with it and what it is that you want to find. A word like 'dog' seems improbable.


    Graham Mayor - Word MVP
    www.gmayor.com

    Thursday, June 11, 2015 3:47 AM