
I need a help from an expert in (outlook) macros writing. What I would like to do is,
exstract some data from a email body and store it into Outlook contacts. See the picture
with proccess flow. All received emails have a standard form for newsletter subscription
and it would look like this:
Email*: [email protected]
Name: Tony Stark
Company: Stark Industries
Action*: Subscribe
So I need a macro that would check the text after "Action*: ", if it is Subscribe or Unsubscribe.
1. If it is Subscribe:
- check if there is already a contact with this email address in Outlook Contacts
> if it is, write message: "Subscriber already exists."
> go to END
- else, generate new contact and copy data from email body to it
> the text after "Name: " goes into Name field
> the text after "Email: " goes into Email field
> the text after "Company: " goes into Company field
> write message: New subscriber %Name% added.
> go to END
2. If it is Unsubscribe:
- check if there is already a contact with this email address in Outlook Contacts
> if it is not, write message: "Subscriber does not exist!"
> go to END
- else, delete the contact
> write message: Subscriber %Name% deleted.
> go to END

Thank you guys for your help!!!
Sergio