• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 129
  • Last Modified:

outlook attachment automation

I have a user request to automate a process.
We receive a single email with 20 or so attachments. Each attachment has a unique file name.
They normally forward on the individual attachment to a email address based on the attachment name.
So attachment name = email address.

Is there a way to forward on a single attachment from a email with multiple attachments based on the file name?
0
MB-tech
Asked:
MB-tech
  • 4
  • 4
1 Solution
 
SimonCommented:
How is the attachment name related to the email address? Is it exactly the same, or with ".txt" or some other file extension on the end?
What are the attachments? e.g. are the Excel files, text files, email .msg format?
0
 
MB-techAuthor Commented:
Attachment name would be a series of numbers, like an account number. The attachments are PDF files.
I was thinking along the lines of if attachment name was 123456.pdf then send that to abc@xyz.com.

If it was one attachment per email it would be a lot simpler but multiple attachments per mail all needing to go to different email address's has me stumped.
0
 
SimonCommented:
It sounds like you must have a separate table (in Excel, Access or some other format) with the
AccountNumber and Email address fields?
Would it be acceptable to 'drive' the process from the other application, by clicking a button for example? Or, is the user looking for a 'rule' type solution in Outlook/Exchange?

I do two not dissimilar and currently separate processes at the moment:
1. Using VBA in Excel to pick an Outlook folder and process all emails in it, validating and saving the attachments
2. Using VBA in MS Access to make Outlook generate and display or send emails for each file in a folder, with the recipients based on the attachment names.

Does the user have particular requirements around the personalisation, formatting and content of the email message that should go to each individual recipient?

If what you've read so far is on the right lines...
Which version of Office and what platform is your user on?
How many of the incoming emails are there per day, and would they be in a dedicated folder, or would it be necessary to search through the inbox for messages to process?
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
MB-techAuthor Commented:
Happy to drive the process from a separate application. I could dedicate a VM to this and just let it run.
I did not think Outlook could handle this as a rule type situation. Would be nice but feel it would be pushing the limits.

I have seen a process that can extract all the attachments and put them into a folder. Then all that would be needed is a process to pick them up one at a time and email based on the file name.

No requirements around presentation.

We can use any version of office needed, and any OS. Standard is Office 2013 and W7.
We could create a dedicated folder/email address/account.
0
 
MB-techAuthor Commented:
Frequency is only once a month. So while not high, it's more about accuracy and removing yet another mundane task from a user.
0
 
SimonCommented:
Sorry, I didn't get a notification that you'd responded. I can post some code tomorrow, unless someone else wants to jump in first...
0
 
SimonCommented:
Hi, please try the attached.

By default, It looks for a folder in the user's inbox named "ForwardMe" that emails that you want to scan for attachments should be moved into by a rule (or manually). You can blank the default value out to be prompted to pick a source folder of your choice from within your mailbox when it runs.

You will need to populate the table that correlates account numbers with email addresses.

After a single successful run it will set the repeat interval to the one you specify, but if it encounters errors it will always reset it to zero so it doesn't keep running.

It will stop and display an error in the message area and its event log if it encounters an attachment with a name that has no corresponding email address.

I've cut this down to keep this example as simple as possible, but it can easily be updated to use a template email if the outgoing emails that it sends need to have particular formatting or personalised content.
ScanFolder-ForwardAttachments-v001.accdb
0
 
MB-techAuthor Commented:
Hi Simon,

I'll need to get one of the DB guys onto this. I would say it looks good, but I would not know.

but many many thanks. I am sure it will be great. I will let you know how we go.
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now