Outlook AppointmentItem - How do I programmatically add RTF to its Body?

前端 未结 2 1981
名媛妹妹
名媛妹妹 2021-01-15 06:19

I would like to set the Body of an AppointmentItem to a string of RTF that contains an embedded image. Setting Microsoft.Office.Interop.Outl

2条回答
  •  不思量自难忘°
    2021-01-15 06:38

    The only way I know is to access the AppointmentItem's GetInspector property, and use it to fetch the underlying WordEditor used to parse the RTF format, something like:

    var doc = appointment.GetInspector.WordEditor as Microsoft.Office.Interop.Word.Document;
    

    and then format the document using doc.Content according to Word Object Model.

提交回复
热议问题