• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Outlook send email

Hi,

I am trying to send certain email as attachment. Anyone can help?
Following is the Scenario:
I receive emails with loan numbers. I need to use this as attachment and forward this to different employees basis the loan number. This is manual process that take huge time...please help!!
Great thanks in advance!!
 
Do you have data in tabular format of loan number vs assigned employe or how you use to forward it. Do we need to loop all emails in inbox or need to check with certain criteria.

A little more explanation will help in helping you.
 
Hi..thanks for initiate the help!!!
Actually this is procss of work allocation..I receive emails which have certain agents name randomly mentioned in the subject of email...in the starting of the day I copy the attachments and distribute it among my team members...so for example I have received 10 emails from 3 different agents...now I will copy the emails as attachment and forward to 3 people in my team...each person Will get loans of 1 type of agent....this also means that 1 agent will be handled by 1 teammate in a day.... but 1 teammate can process multiple agent's loans....then I maintain a sheet where I mention to whom i have shared which agents' loan...now when i again get the emails I check if that agents' loans have already given to any teammate...if yes then I send the email as attachment to the same teammate...else I send it to whosoever doesn't have work.....and uodate my excel sheet......
Now what I need is the following:
When I get emails with certain agent name in subject line I Will copy email subject manually and paste in that excel file....in this sheet I have a column named as assign to....where I will enter the name of teammate whom loans need to be assigned....now vba coding should check which loan has been assigned to which team mate and should send that email as attachment to that teammate...
Hope I am able to clarify my question.....
 
I'm not sure that this is the right path:
Better solution might simpler (IE: outlook rules) or SP Workflows. Worst case, this is maybe an Access thing.
 
sandysharma

Few things are pending for optimization in xl.

Few Briefing..

upload_2017-2-13_23-4-4.png

1. Get outlook email info

While getting emails from outlook, code will check that the email info has not been available in sheet.
Look's like
upload_2017-2-13_23-10-6.png

2. Assign Task
There are two two colored columns (F & I)

Put the email address in Col F & "Y" in col I - for those needs to forward

Look's like
upload_2017-2-13_23-9-39.png

3. Send Email
Hit the send button & emails will be forwarded as attachment.
Look's like
upload_2017-2-13_23-12-31.png

Let me know further...

I have taken the base form the @Monty code!
 

Attachments

  • Forward_emails_V1.xlsb
    27.9 KB · Views: 13
Hi Deepak,

Thanks for the efforts.

This code is giving the error of Can't find project or liberary on the below line

Sub Get_Emails(olfdStart As Outlook.MAPIFolder, Date1)

and it opens up Reference:VBA Project window where one line starting with MISSING is checked..

If I uncheck it and run then it gives the error of user not defined...
 
Tick the appropriate version of outlook ref in tools>ref>Microsoft Outlook control xx library.
 
just have 1 query...what below line is doing in the coding..
PA = Array("0x5D01001F", "0x5D02001F", "0x800F101F", "0x39FE001E", "0x39FE001F", "0x5D09001F", "0x0C1F001E")
 
Hey James.

Must follow guy Deepak:awesome:. Expert in Outlook vba automations:).

i am following deepak do you?:):):):):):)


Thanks @Monty for the kind words.. I have learned lots of things here.
In childhood, Teacher's use to say that You can't rememeber the mathematics so just keep practicing & Code also says the same - To be updated don't forget to keep coding. Have fun guys...
 
Back
Top