Win32 Com / Outlook

Roger Upole rupole at compaq.net
Fri Sep 22 18:13:26 EDT 2000


If you run makepy on the object library first, the constants will be
put in win32com.client.constants when you do your Dispatch.
>>> o = win32com.client.Dispatch('Outlook.Application.9')
>>> win32com.client.constants.olFolderOutbox
4
          HTH
          Roger Upole

<rick_richardson at my-deja.com> wrote in message
news:8qg955$h5u$1 at nnrp1.deja.com...
> Alright.. still a little sketchy on the COM
> interface in python. I was wondering a couple
> things.. first.. when I create a object doing:
>
>    olApp =  Dispatch('Outlook.Application')
>
>    mapiNS = olApp.GetNamespace("MAPI")
>
>    # Open the Outbox
>    outbox = mapiNS.GetDefaultFolder(0x4)
>
> How do I get the properties of the application
> object? the last line should read
>    ... .GetDefaultFolder(olFolderOutbox)
> but python says olFolderOutbox is an invalid
> name, so I used the according hex digit I found
> the makepy file.. as doing stuff like
> olApp.olFolderOutbox doesn't work.. any ideas for
> accessing member variables of a COM object?
>
> also.. if anyone's written a sendmail type
> routine with MAPI or outlook and wants to share
> it I'd love to see it.. I have mine written.. but
> can't get it to work.
>
> Thanks
>
> Rick Richardson
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.





More information about the Python-list mailing list