Created
October 6, 2014 08:46
-
-
Save mursts/378711fb85ab1702d501 to your computer and use it in GitHub Desktop.
Outlookに予定を追加します
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
import win32com.client | |
import datetime | |
def add_outlook_schedule(): | |
APPOINTMENT_ITEM = 1 | |
outlook = win32com.client.Dispatch("Outlook.Application") | |
mapi = outlook.GetNamespace("MAPI") | |
item = outlook.CreateItem(APPOINTMENT_ITEM) | |
item.Start = datetime.datetime.today() | |
item.Duration = 30 | |
item.Subject = '定例ミーティング'.decode('utf-8') | |
item.Body = 'いつものミーティング'.decode('utf-8') | |
item.ReminderMinutesBeforeStart = 0 | |
item.ReminderSet = True | |
item.Save() | |
if __name__ == '__main__': | |
add_outlook_schedule() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment