0
我試圖在Outlook 2007中創建一個約會,使用Python 3. 我能夠使用純文本正文創建日曆,但不能使用HTML文本創建正文。有沒有「CreateItem.HTMLBody」屬性使用Python發送AppointmentItem與Python正文win32com庫
import win32com.client
outlook = win32com.client.Dispatch("Outlook.Application")
App = outlook.CreateItem(1) #olAppointmentItem
App.Subject = "Meeting with CEO"
#App.Body = 'Hi Tim, <br><br>Kindly attend the meeting.'
App.HTMLBody = 'Hi Tim, <br><br>Kindly attend the meeting.'
App.Location = "Meeting Room 10"
App.Start = '2017-07-17 15:00'
App.Duration = 3
recipient='[email protected]'
App.MeetingStatus = 1
App.Recipients.Add(recipient)
App.Display()
#App.Send()
我一直在使用GetInspector.WordEditor也嘗試過,但同樣只是給純文本。
Selection = App.GetInspector.WordEditor.Windows(1).Selection
Selection.TypeText ('Hi Tim, <br><br>Kindly attend the meeting.')
我該怎麼辦?有小費嗎?
我已經通過他們去之前,它沒有解決如何發送HTML正文。這就是我卡住的地方。 –
也許這個 - https://stackoverflow.com/questions/882712/sending-html-email-using-python – Abhijeetk431