none
RTF body outlook 2007 mail item RRS feed

  • Question

  • Hi all,

     

    I am using oom. How to get rtf body from outlook 2007 mail item? There are body and htmlbody properties but no rtfbody. Also, I try not to use redemption.

     

    Thanks!

    Tuesday, September 4, 2007 4:38 AM

Answers

  • Hi,

     

    There is no means to get the mail’s RTF Body via OOM. If you want to format the text of mail without using Redemption, you can use the ActiveInspector()’s WordEditor to get the document of word (You must use Word as your editor). And then work on the Content property of it. Codes are like these:

    object missing = Type.Missing;

                object fileName = @"C:\test.docx";

                Word.Document doc = app.ActiveInspector().WordEditor as Word.Document;

                doc.SaveAs(ref fileName, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);

     

     

     

    Thanks

    Ji

     

    Thursday, September 6, 2007 12:03 PM
    Moderator

All replies

  • Hi,

     

    There is no means to get the mail’s RTF Body via OOM. If you want to format the text of mail without using Redemption, you can use the ActiveInspector()’s WordEditor to get the document of word (You must use Word as your editor). And then work on the Content property of it. Codes are like these:

    object missing = Type.Missing;

                object fileName = @"C:\test.docx";

                Word.Document doc = app.ActiveInspector().WordEditor as Word.Document;

                doc.SaveAs(ref fileName, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);

     

     

     

    Thanks

    Ji

     

    Thursday, September 6, 2007 12:03 PM
    Moderator
  • Thank you very much! It helps.

    Friday, September 7, 2007 12:39 AM