Author Topic: Automated Processes (ultimate challenge)  (Read 4616 times)

0 Members and 1 Guest are viewing this topic.

Offline pyte

  • Peasant
  • *
  • Posts: 79
  • Cookies: -7
    • View Profile
Automated Processes (ultimate challenge)
« on: December 13, 2012, 07:14:42 am »
Task @ Hand
. I receive 100 - 200 emails a day each with an attachment in my outlook
. I have to choose them as per category and summarize them in an excel sheet 
this means i have to look into the attachments (CVs) get senders name, qualifications & work experience .
The idea
to write a script that:
1. separates emails as per subject category placing them into different folders (in outlook or elsewhere)
2.Rip the attachments as per the categories.
3.run through each of the attachments(often word documents)
4.copy specific info eg (name, email, education background etc)
5. finaly paste in excel .


here is an example.
Any help here ? ill be getting onto research on the same
 
Teddy Mugendi Sekure        2010-To date            4thOctober 2012                                                                                                                                       
clay@yahoo.co.ke             Masters of busines        Senior Consultant                                                     
7216122                       United states University      Ariel  limited                     

« Last Edit: December 13, 2012, 07:26:25 am by pyte »
If you don't go into the tiger's cave, how will you get the cub?

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Automated Processes (ultimate challenge)
« Reply #1 on: December 13, 2012, 08:14:05 am »
What you want to do is not use Outlook at the proxy - why dafuq are you using outlook anyway?? Thunderbird can do everything better - plus it has a add-on API with which you could do your desired idea.
Leaving clients aside... if the mail server supports IMAP protocol, it would be fairly easy with python to connect and read mail from IMAP. You could create separate folders and put your sorted emails in them.
Not sure about reading attachments though.

I can't do this for you, so don't PM me.

Offline pyte

  • Peasant
  • *
  • Posts: 79
  • Cookies: -7
    • View Profile
Re: Automated Processes (ultimate challenge)
« Reply #2 on: December 13, 2012, 08:45:33 am »
Quote
I can't do this for you, so don't PM me.


im kind of tied on the kind of approach to take in this ...
i agree about Thunderbird but on the other hand , Outlook is the only option i got.



« Last Edit: December 13, 2012, 08:46:33 am by pyte »
If you don't go into the tiger's cave, how will you get the cub?

Offline geXXos

  • Royal Highness
  • ****
  • Posts: 646
  • Cookies: 178
    • View Profile
Re: Automated Processes (ultimate challenge)
« Reply #3 on: December 13, 2012, 09:22:22 am »
@pyte
You could use the scripting language called AutoIt for this kind of work,check their forum you will find many posts on how to do this,there is also a UDF for outlook.Also you could use  PST to receive the mails and later convert them to excel. But again check AutoIt is very easy to grasp,and is perfect for what you want.


This is just a sample of a script in AutoIt thats export all mail in  Outlook Inbox.
Quote
#include <OutlookEx.au3>


$oOutlook = _OL_Open()
ConsoleWrite("_OL_Open: " & @error & @LF)
$Local_Folder = _OL_FolderAccess($oOutlook, "", $olFolderInbox)
ConsoleWrite("_OL_FolderAccess: " & @error & @LF)
$PST1 = _OL_PSTCreate($oOutlook, @DesktopDir & "\Mailarkiv4.pst", "Mailarkiv4", $olStoreUnicode)
ConsoleWrite("_OL_PSTCreate: " & @error & @LF)
$listofmail = _OL_ItemFind($oOutlook, $Local_Folder[1], $olMail, "[UnRead]=True", "", "", "EntryID")
ConsoleWrite("_OL_ItemFind: " & @error & @LF)
ConsoleWrite("_OL_ItemFind: " & $listofmail[0][0] & " items found" & @LF)
For $i = 1 To $listofmail[0][0]
    _OL_ItemCopy($oOutlook, $listofmail[$i][0], "Default", $PST1)
    ConsoleWrite("_OL_ItemCopy: " & @error & @LF)
Next


_OL_PSTClose($oOutlook, $PST1)
ConsoleWrite("_OL_PSTClose: " & @error & @LF)
_OL_Close($oOutlook)
ConsoleWrite("_OL_Close: " & @error & @LF)
Exit