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@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to