Python and microsoft outlook-using com, can I interact with msoutlook?

Discussion in 'Python' started by Guest, Apr 4, 2006.

  1. Guest

    Guest Guest

    Hi All,
    I know that Microsoft Exchange has a com interface, CDO, but I can't seem to
    find one for Microsoft outlook.
    does anyone have code snippets for using msoutlook and python, or
    suggestions?
    I have looked on Google, and tried some code, but nothing has worked.
    I'm using outlook XP, and any info y'all have is greatly appreciated.
    Thanks,
    Brandon mcginty


    ----------
    Feel free to contact me for technical support, or just to chat; I always
    have time to talk and help, and an open ear.
    Email:
    Skype:brandon.mcginty
    Msn:
    Aim:brandonmcginty (Not currently available.)
    Cell:4802025790 (Weekends and nights only, please.)
    "Kindness is a language that the deaf can hear and the blind can see."
    Mark Twain

    --
    No virus found in this outgoing message.
    Checked by AVG Free Edition.
    Version: 7.1.385 / Virus Database: 268.3.4/299 - Release Date: 3/31/2006
     
    Guest, Apr 4, 2006
    #1
    1. Advertising

  2. wrote:
    > Hi All,
    > I know that Microsoft Exchange has a com interface, CDO, but I can't seem to
    > find one for Microsoft outlook.
    > does anyone have code snippets for using msoutlook and python, or
    > suggestions?


    You can use CDO to manage your Inbox, send mail etc.

    The following functions navigate to a certain folder and parse every
    message text for a certain regular expression:

    def spamstat ():
    s = Dispatch ("Mapi.Session")
    s.Logon ("Default Outlook Profile")
    junk = findJunk (s)
    rex = re.compile ('The ([0-9]+) emails listed below')
    for msg in junk.Messages:
    text = msg.Text
    match = rex.search (text)
    if match:
    date = parseDate (msg.TimeSent)
    print (date, int (match.group (1)))

    def findJunk (s):
    inbox = s.Inbox
    for folder in s.Inbox.Folders:
    if folder.Name == 'Junk':
    return folder


    See the Spambayes Outlook plugin (http://spambayes.sourceforge.net/) for
    a complex example.

    Daniel
     
    Daniel Dittmar, Apr 4, 2006
    #2
    1. Advertising

  3. Guest

    J Correia Guest


    ><> wrote in message
    >news:...
    >Hi All,
    > know that Microsoft Exchange has a com interface, CDO, but I can't seem to
    >find one for Microsoft outlook.
    >does anyone have code snippets for using msoutlook and python, or
    >suggestions?


    Check out:

    http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/173216
    also:
    http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/266625
    and:
    http://www.win32com.de/index.php?option=com_content&task=view&id=97&Itemid=192

    Also I've emailed you a pdf I'd downloaded a while back,
    unfortunately I can't remember the source to credit here.

    That should get you started.

    HTH,

    JC
     
    J Correia, Apr 4, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Charles A. Lackman
    Replies:
    1
    Views:
    1,365
    smith
    Dec 8, 2004
  2. SpamProof
    Replies:
    0
    Views:
    577
    SpamProof
    Oct 21, 2003
  3. Kevin
    Replies:
    0
    Views:
    314
    Kevin
    Nov 11, 2003
  4. Andrew Robert

    Using Python to interact with BMC Patrol

    Andrew Robert, Sep 7, 2005, in forum: Python
    Replies:
    0
    Views:
    352
    Andrew Robert
    Sep 7, 2005
  5. Replies:
    1
    Views:
    299
Loading...

Share This Page