[python-win32] how to get access to someone's else Outlook Calendar ?
stef.mientki at gmail.com
Mon May 3 22:40:27 CEST 2010
On 29-04-2010 09:08, Mark Hammond wrote:
> IIRC, the outlook application doesn't support a Logon. Your best bet
> is probably to try and find some examples in VBScript or any other
> language and then translate the knowledge that gives you into Python.
that was a very good hint.
I found this VB script:
rewritten into Python (see code below, needs some refactoring), works
Now one small question, how do I get those constants, like
constants.olFolderCalendar (=9) ?
outlook = win32com.client.Dispatch("Outlook.Application")
namespace = outlook.GetNamespace("MAPI")
Item = outlook.CreateItem ( 1 ) #constants.olAppointmentItem ) #olMailItem)
Recip = Item.Recipients.Add ( 'Klaasen, Jan' ) # <== this is not me,
but some other !!
if Recip.Resolved :
Folder = namespace.GetSharedDefaultFolder ( Recip, 9 )
afspraken = Folder.Items
##afspraken.IncludeRecurrences = "True"
#Possible columns are Subject, Location, Start, End, Recurrence
afspraak = afspraken.GetFirst()
start = datetime.datetime.fromtimestamp (int (afspraak.Start))
subject = afspraak.Subject.encode("utf-8")
print '===', start, subject
afspraak = afspraken.GetNext()
if start.year >2011: #nextYear:
#avoid to loop until 2038 :-)
> On 29/04/2010 5:34 AM, Stef Mientki wrote:
>> I want to control a number Outlook Calendars from different persons,
>> and I have access privilges and can manipulate them through Outlook.
>> Now I want to control them through Python.
More information about the python-win32