Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'resulting': 0.04; 'subject:password': 0.05; 'subject:Python': 0.06; 'subject:file': 0.07; 'subject:How': 0.10; 'python': 0.11; 'csv': 0.16; 'easier.': 0.16; 'folder,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'steps,': 0.16; 'subject: \n ': 0.16; 'subject:Outlook': 0.16; 'subject:download': 0.16; 'subject:folder': 0.16; 'subject:login': 0.16; 'subject:run': 0.16; 'exception': 0.16; 'folder': 0.16; 'appropriate': 0.16; 'wrote:': 0.18; 'thu,': 0.19; '(the': 0.22; 'aug': 0.22; 'separate': 0.22; 'certainly': 0.24; 'subject: .': 0.24; 'file.': 0.24; 'sort': 0.25; "i've": 0.25; 'excel': 0.26; 'header:In-Reply- To:1': 0.27; 'correct': 0.29; 'subject:) ': 0.29; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'file': 0.32; 'run': 0.32; 'open': 0.33; 'subject:the': 0.34; 'problem': 0.35; 'created': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'possible': 0.36; 'two': 0.37; 'being': 0.38; 'solving': 0.38; 'window': 0.38; 'to:addr:python-list': 0.38; 'files': 0.38; 'pm,': 0.38; 'anything': 0.39; 'morning': 0.39; 'to:addr:python.org': 0.39; 'back': 0.62; 'choose': 0.64; 'different': 0.65; 'taking': 0.65; 'details': 0.65; 'subject': 0.69; 'receive': 0.70; 'secure': 0.71; 'click': 0.77; 'inbox': 0.93; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=tHIKn8WP4Fg3v4RulWoz1XgcePdAMJlPilpo4OrwcxU=; b=YStQKGCdSfof1AeEVfjC/dSwoeCZApaxgbrG8L1eDBhR/71Ij58PtcXGbuVf3z4Xkr dL4FAOZfv6IMLbFq8033SoHocLqPl4Eaq1jLFJ5Pj5rukasjm5HEp0+MH3maIhEPgxYb ONecc4drAnzmN3/aXi1Niwx6HdaJx5Xb9vfQLWKooLhmeg4pJCjIi6eSE03Urw5Ldxt9 Odi/SfN47P0F6tm7TtmS6s9VD0d0fuEO47KHeLvFh80J0kzpnspRl31N8uoiCnu+KnRx T7KqS9/Cgx9vHJ/Y1KqO/t5aZUuRD4Q/R1lU5S/lFtbULx/J4810PrabAIwoG8F78yLz CTFA== MIME-Version: 1.0 X-Received: by 10.58.214.105 with SMTP id nz9mr803457vec.58.1375379257400; Thu, 01 Aug 2013 10:47:37 -0700 (PDT) In-Reply-To: <1d7bfd13-52d0-4d2b-8f7f-e117cdec2a5b@googlegroups.com> References: <1d7bfd13-52d0-4d2b-8f7f-e117cdec2a5b@googlegroups.com> Date: Thu, 1 Aug 2013 18:47:37 +0100 Subject: Re: 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 From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1375379259 news.xs4all.nl 15987 [2001:888:2000:d::a6]:56526 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51747 On Thu, Aug 1, 2013 at 6:31 PM, wrote: > Details > Every morning I receive three emails (three different subject lines) in t= he same Sub-Folder ("POINT") under Folder ("Reports") in my Inbox in Outloo= k. Each email has two secure hyperlinks, one provides me with a site to re= gister and the other provides a window for me to enter my password to downl= oad a .csv file. > > Is there code that will open the "Unread" emails in the "POINT" folder, c= lick 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 cre= ated 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