Consulting

Results 1 to 2 of 2

Thread: Outlook Rules Custom Action

  1. #1
    VBAX Newbie
    Joined
    Sep 2009
    Posts
    2
    Location

    Outlook Rules Custom Action

    Bs"d
    Hi everyone
    I want to add new rule in outlook with custom action.
    I get massage from my site when get new order, and I want to send automatic replay. The problem is, that the email address of the customer is in the body of the Content so I can not respond to sender address because it from my webmaster address.
    I want to add new custom action that find the email address that Is between two words, and send to this automatic replay with template.
    Can anyone help me please?

    All the best,
    Beri

  2. #2
    VBAX Expert JP2112's Avatar
    Joined
    Oct 2008
    Location
    Astoria, NY
    Posts
    590
    Location
    You won't be able to create a rule that extracts the email address from the body. You'll need to write VBA programming code that extracts the email, creates a reply from a template and sends it.

    The code will need to be in an event handler so that it runs automatically. For sample code see http://www.codeforexcelandoutlook.co...ck-event-code/.

    To extract the email address, you can use Regular Expressions to search the body for the email, or the Mid and Instr functions if the address is always between the same two words in every email.

    To create a reply from a template, see the CreateItemFromTemplate Method (http://msdn.microsoft.com/en-us/libr...ffice.11).aspx).

    --JP

Posting Permissions

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