[python-win32] how to get access to someone's else Outlook Calendar ?

Mark Hammond skippy.hammond at gmail.com
Thu Apr 29 09:08:16 CEST 2010


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.

HTH,

Mark

On 29/04/2010 5:34 AM, Stef Mientki wrote:
> hello,
>
> 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.
>
> Writing an appointment to my own Calendar works well with the code below.
> But I don't know how to get my college's Calendar.
> I tried with the Logon command,
> but get the following error
> File "D:\Data_Python_25\support\outlook_support.py", line 37, in <module>
> print 'HHHH2',oOutlook.Logon ( 'z904116', '', True, True )
> File "P:\Python26\lib\site-packages\win32com\client\dynamic.py", line
> 512, in __getattr__
> raise AttributeError("%s.%s" % (self._username_, attr))
> AttributeError: Outlook.Application.Logon
>
> Any help would be much appreciated.
> thanks,
> Stef Mientki
>
>
> from win32com.client import constants
> import win32com.client
> import time
> import datetime
>
> print ('Writing a new appointment')
>
> import win32com.client
> oOutlook = win32com.client.Dispatch("Outlook.Application")
> #print 'HHHH2',oOutlook.Logon ( 'z904116', '', True, True )
> #print 'HHHH2',oOutlook.Logon ( '', '', False, False )
> appointment = oOutlook.CreateItem(1) # 1=outlook appointment item
> appointment.Start = '2010-04-29 19:00'
> appointment.Subject = 'Treintjes op zonne-energie'
> appointment.Duration = 15
> appointment.Location = 'Gooseberry Mesa'
> appointment.Body = 'jdasds\njasdaskdas\nasdjsd\dnasdhasd\nhdhsjddasgduy'
> appointment.Save()
> appointment.ReminderMinutesBeforeStart = 15
> #appointment.ReminderSet = true
> #appointment.AllDayEvent = true
> print "done" #, dir (appointment)
>
>
>
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32



More information about the python-win32 mailing list