VBA - Outlook 2010 - Search variable in URLs and move messages to the corresponding folders RRS feed

  • Question

  • Hello, Everyone!

    In Outlook 2010 I have thousand email products updates for multiple customers with URL in message body like that:

    In my example it would be something like that:

    - all before VOP08011316314153US - constant part of URL
    - VOP08011316314153US/ - product ID variable (there are thousands)
    - enter.asp?z=AFE38DC1F69084D0B95648B21B8F1DC65E2D7E9A11A710590C60AA49390E2DC928 - access key unique for each customer (I don't use it)

    I want that a script search for PRODUCT_ID_VARIABLE in all messages in Outlook Inbox folder, create subfolders named according to the PRODUCT_ID_VARIABLE (if it doesn't exist) and move messages with different PRODUCT_ID_VARIABLE into corresponding subfolders.
    In the example below a script should create folders VOP08011316314153US and VOP08011316314154US (if they don't already exist) and move there all messages with product IDs VOP08011316314153US and VOP08011316314154US in URLs:

    -- Email 1
    -- Email 2
    -- Email ...
    -- Email X
    -- Email 1
    -- Email 2
    -- Email ...
    -- Email X

    I am very new in VBA coding. Could anyone help to write a code from a scratch?
    Wednesday, January 23, 2013 7:53 AM

All replies

  • It's urgent need! I would even donate some money into your PayPal account if you help me to write the code!
    Wednesday, January 23, 2013 8:28 AM
  • I also noticed that the patterns of product IDs always have VOP in the beginning and US at the end divided with 14 numbers only such as: VOP??????????????US
    Wednesday, January 23, 2013 9:51 AM