ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/learning/outlook_com.py
Revision: 591
Committed: Tue Nov 3 22:45:12 2015 UTC (10 years, 4 months ago) by nino.borges
Content type: text/x-python
File size: 806 byte(s)
Log Message:
Moved dir out of main dir.

File Contents

# User Rev Content
1 ninoborges 8 ## Testing automating Outlook
2     ## This is not ment to be run as a program or imported as a module. Its just a reference
3     ## outlook date formatting is "mmmm dd, yyyy hh:mm am/pm"
4     #Eaborges
5     #12.28.01
6    
7     from win32com.client import Dispatch
8     from win32com.client import constants
9    
10     def Main():
11     o=Dispatch("Outlook.Application.9")
12    
13    
14     def Contacts():
15     contact = o.CreateItem(constants.olContactItem)
16     contact.FullName = "Test"
17     contact.PrimaryTelephoneNumber = "555-5555"
18     contact.Save()
19    
20     def Calendar():
21     appointment = o.CreateItem(win32com.client.constants.olAppointmentItem)
22     appointment.Subject = "Gone to gym"
23     appointment.Location = "Capital Club"
24     appointment.Start = "12 29, 2001 03:00 pm"
25     appointment.End = "12 29, 2001 4:00 pm"
26     appointment.Save()