How to use Python to open Unread message(s) in specific Outlook folder, clicking a hyperlink within the email message to a secure login window, entering password to download .csv file, run Excel macro

hambergcfa at gmail.com hambergcfa at gmail.com
Thu Aug 1 14:08:37 EDT 2013


On Thursday, August 1, 2013 1:47:37 PM UTC-4, Chris Angelico wrote:
> On Thu, Aug 1, 2013 at 6:31 PM,  <hambergcfa at gmail.com> wrote:
> 
> > Details
> 
> > Every morning I receive three emails (three different subject lines) in the same Sub-Folder ("POINT") under Folder ("Reports") in my Inbox in Outlook.  Each email has two secure hyperlinks, one provides me with a site to register and the other provides a window for me to enter my password to download a .csv file.
> 
> >
> 
> > Is there code that will open the "Unread" emails in the "POINT" folder, click the appropriate hyperlink, enter my password (the same for all emails), and download the .csv file and then run an Excel macro?  I've already created the Excel macro, one for each of the different files I'm downloading.
> 
> 
> 
> Okay, taking a few steps back here.
> 
> 
> 
> 1) You receive an email
> 
> 2) That email has two URLs in it ("secure hyperlinks" means they begin
> 
> https:// ?)
> 
> 3) You choose one of them as being "appropriate" - is it always the second?
> 
> 4) You download the document at that URL, which requires a password
> 
> 5) You then run some sort of alteration on the resulting CSV file.
> 
> 
> 
> Please correct me on anything I've misunderstood.
> 
> 
> 
> Python can certainly do all of these steps, with the possible
> 
> exception of fetching the email. Dividing the problem up into separate
> 
> steps will make the solving of it easier.
> 
> 
> 
> ChrisA

Thanks a lot ChrisA!  You are correct with everything except that the login hyperlink is always the first link and the second one is the link to register.



More information about the Python-list mailing list