473,569 Members | 2,721 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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:Br******* ******@gmail.co m
Skype:brandon.m cginty
Msn:br********* ****@hotmail.co m
Aim:brandonmcgi nty (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


Apr 4 '06 #1
2 4518
br************* @gmail.com 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
Apr 4 '06 #2
<br*********** **@gmail.com> wrote in message
news:ma******* *************** *************** **@python.org.. .
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/Coo.../Recipe/173216
also:
http://aspn.activestate.com/ASPN/Coo.../Recipe/266625
and:
http://www.win32com.de/index.php?opt...=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

Apr 4 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
8133
by: Daniel Pope | last post by:
Hello Everybody, I'm preparing for doing a daunting task: to access Out look Microsoft Outlook Express(regardles the operating system and Outlook version) from a Java applet (after the client (user) acknowleges to run this applet on his machine). The user has to read the existent user Microsoft Outlook users accounts and to setup another...
0
1362
by: RitaG | last post by:
Hi. When I set "Option Strict" to On, I'm getting an error message "Option Strict On disallows implicit conversions from 'System.Object' to 'Outlook.MailItem' with the following code: Dim oApp As New Outlook.Application Dim oNS As Outlook.NameSpace = oApp.GetNamespace("MAPI") Dim oInBox As Outlook.MAPIFolder = _...
4
7731
by: rockio | last post by:
I have two computers with MS Access 2000 installed. However one computer has Microsoft Outlook 2002 installed while the other does not. The computer without Microsoft Outlook 2002 does not seem to recognize the Date() Function and Left Function and possibly other functions that I haven't used. The only difference between the reference...
3
7666
by: bobdydd | last post by:
Hi All Is there a way that I could programatically check to see if Microsoft Outlook is installed on the PC. Someone suggested this code, below, but it is version specific. Dim appOutlook as Outlook.Application On Error Resume Set appOutlook = CreateObject("Outlook.Application.8") If Err.Number = 429 Then
3
5181
by: melissa86 | last post by:
I have used Microsoft Outlook for 2 years with no problems. However, in the last few weeks it keeps locking up. I can send messages, but whenever I hit the send/receive button, the hourglass comes on and it just sits there. It locks up the whole computer and I have to turn it off. (I do delete cookies, temp files, and do defrag on a regular...
10
4446
by: fridaynite | last post by:
hello >>>> i was in microsoft outlook checking e-mail and mcafee security caught this mcv668 tmp. macafee said it was caught and cleaned. i ran a virus scan and no problems. now when i open outlook it brings up 9 emails and then this same virus again mcafee catches and cleans the outlook will lock up. this happens every time. any ideas? ...
9
12588
by: CoCoCha | last post by:
Hi, I am trying to run a simple macro in excel vba to create a new email and attach two spreadsheets. But it won't work. It stops at the first line everytime. Dim objOutlook As Outlook.Application Do I need to install Microsoft Outlook 9.0 Object Library? When I go to Tools-->references I checked off MS outlook 9.0 Object Library. Then it...
1
7554
by: Sylfelin | last post by:
Hello, If I use Microsoft Outlook 12.0 Object Library (Outlook 2007) COM Object in my application, the custommer must have the outlook 2007 on his computer ? But if i use Microsoft Outlook 11.0 Object Library (Outlook 2003) COM Object in my application, the custommer must have the outlook 2003 or outlook 2007 on his computer ?
2
1453
by: =?Utf-8?B?RkZD?= | last post by:
Does microsoft outlook 6 have a calender, I cannot find a calender in microsoft outlook 6, is there one? and how do i find it if there is? I there isn't how do I get one? thankyou for your time in this regard :)
2
2247
by: Rossouw | last post by:
Good day, I was wondering if there is a way to catch the print event of Microsoft Outlook, or some way to write macros to run an event before printing an email. The reason for this is, it seems that one can't get rid of the to, from, cc, etc. heading of an email when one needs to print (some versions of outlook can do this, others can't),...
0
7695
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7922
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8119
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6281
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.