Home arrow GIS Data & Resources arrow Scripts and Code arrow Python arrow Python: Make an Appointment in MS Outlook
Python: Make an Appointment in MS Outlook PDF Print E-mail

Written by Kevin Bell,

Have you ever wanted to get your GIS to talk to your calendar?  If you have a feature with a date field, you may like to set an apointment in MS Outlook based on the date. You'd need to use a search cursor to access the attributes in your feature class, and then you could alter the code below to add to your calendar. I forget where I picked up this toy code, but you might google for "python MS Outlook"...

(EXAMPLE:  you may want to have appointments generated to go check on expired permits.)

#name: OutlookWriteApt.py
#date: 20070213
#author: Kevin Bell
#email: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
#phone: (801) 535-7131
#purpose: hit MS OUTLOOK!  you could use this to add an apt based on a date field in a feature class...


import win32com.client
oOutlook = win32com.client.Dispatch("Outlook.Application")
appointment = oOutlook.CreateItem(1) # 1=outlook appointment item
appointment.Start = '2007-10-23 17:00'
appointment.Subject = 'Mountain biking'
appointment.Duration = 15
appointment.Location = 'Gooseberry Mesa'
appointment.Save()
print "done"


Users' Comments  
 

No comment posted

Add your comment

29, Oct. 2007
Last Updated ( 29, Oct. 2007 )
 
< Prev   Next >

AGRC Contacts | UGIC Contacts

feed image feed image

Utah GIS Portal © 2009 AGRC

Optimized for