Questoin about outlook calendar

Roger Upole rupole at hotmail.com
Fri Sep 1 00:12:12 EDT 2006


"Gallagher, Tim F (NE)" <Tim.Gallagher at gd-ais.com> wrote in message 
news:mailman.10199.1157042585.27775.python-list at python.org...


"Gallagher, Tim (NE)" wrote :
> import win32com.client
> import time
> import datetime
>
> outlook = win32com.client.Dispatch("Outlook.Application")
> namespace = outlook.GetNamespace("MAPI")
> appointments = namespace.GetDefaultFolder(9).Items
>
> #print appointments.count
> x = 4  # This is a number for one of the calendar entries
> print appointments[x]
> print appointments[x].start
> print appointments[x].end
> print appointments[x].RecurrenceState
> print appointments[x].EntryID
> print appointments[x].IsRecurring
> recItem = appointments[x].GetRecurrencePattern


> GetRecurrencePattern is a method, so at this point recItem
> is a reference to the method itself, rather than the result of calling
it.
> You'll need to add parens to actually call it.
>
>       Roger



> OK, I am a little lost, I do not want anyone doing my work for me but
> can you give me an example.
>
> I am using this as an example to learn python.
>
> Thanks
> -T

recItem = appointments[x].GetRecurrencePattern()
Note the parens on the end.  It's very easy to forget
these when translating from VB, which doesn't
require them to call a method.

        Roger




----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---



More information about the Python-list mailing list