none
Outlook VSTO Print Sections RRS feed

  • Question

  • I can print emails or a selection of emails but trying to have the option of printing only the last reply in the message body instead of the whole conversation.

    Is there a way of detecting the where the current message and the previous conversation begins?

    Cheers,

    J

    Friday, June 24, 2016 3:17 PM

Answers

  • Hello J,

    You need to parse the message body on your own.

    The Outlook object model provides three main ways for working with item bodies:

    1. Body - a string representing the clear-text body of the Outlook item.
    2. HTMLBody - a string representing the HTML body of the specified item.
    3. Word editor - the Microsoft Word Document Object Model of the message being displayed. The WordEditor property of the Inspector class returns an instance of the Document class from the Word object model which you can use to set up the message body.

    You can read more about all these ways in the Chapter 17: Working with Item Bodies. It us up to you which way is to choose to deal with the message body.


    [custom.development]

    Friday, June 24, 2016 5:03 PM