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