[python-win32] get outlook to/from fields

Kelie kf9150 at gmail.com
Fri Aug 17 18:17:29 CEST 2007


Radu Ciora <raduciora <at> yahoo.com> writes:
> Hi everyone,I have an application which monitors the user input and
environment.I was wondering if it can get the the to/from fields from an opened
email in outlook/outlook express.I don't have a handle to Outlook as I don't
start the application from inside python. Is it possible to get one?Any help
much appreciated!Thanks  a million,Radu.
> 

If the opened email is the current item, would the following be helpful? It is
in VBA, but should be easy to translate to Python with pywin32.

Public Sub Test()
    Dim myOlApp As New Outlook.Application
    Dim myItem As Object
    Set myItem = myOlApp.ActiveInspector.CurrentItem
    Debug.Print myItem.To
    Debug.Print myItem.From
End Sub



More information about the python-win32 mailing list