PDA

View Full Version : Outlook Macro - Creating a rule to save to specific folder



tforthofer54
07-27-2015, 07:32 AM
Hi Guys,

I need some help with an issue that I have. I'm working on trying to create an outlook rule using VBA code. I don't have much experience in writing VBA code so hence my struggle. I receive emails from a specific email address everyday. Sometimes I only receive 5 emails sometimes it is over 100. All of the emails are in the same format. It begins with a 3 letter code like ABC, BBB, AAA, ie (there are about 30 different letter codes). After the letter codes there is a space or a dash with the following Document 1, Contract 2, Report 1. So to summarize they are setup in the following format [3 Letter Code] [document name].

My goal is to create a VBA that will save these emails to a specific folder using the 3 letter code then using the document name under the folder with the attachments.

ABC
Report 1
Contract 2

BBB
Report 71
Contact 6

Is this possible with outlook VBA and do you have a suggestions on how I can do this?

Thanks

gmayor
07-27-2015, 08:45 PM
The short answer is that it is possible to do this, but you will need to clarify EXACTLY what the messages look like (can you attach one, or a screenshot of one?) and what you want to do with them?

What do the following mean?
After the letter codes there is a space or a dash with the following Document 1, Contract 2, Report 1. So to summarize they are setup in the following format [3 Letter Code] [document name]. The two statements don't equate to one another.

Is the string in the subject or the message body? Are the 'codes' always in upper case? What determines whether there is a space or a dash?

And


lsave these emails to a specific folder using the 3 letter code then using the document name under the folder with the attachments.
What 'specific folder'?. Is this a Windows folder or an Outlook folder?

What are the attachments? Where do you want them saved?