none
I need the HTML-text AND the plain-text of the body of an ItemType RRS feed

  • Question

  • i know, that i can retrive the Value of the body as plain-text or as HTML-text using BodyTypeResponseType. But i get either the HTML-text or the plain-text, not both.

    Currently i retrive the ItemType twice. First time with HTML-text and second time with plain-text. But this isn't realy performant. Is there no way to get both at one time?

    Wednesday, January 26, 2011 10:55 AM

Answers

All replies

  • Hell GambaJo,

    I think you can accomplish this by using extended properties. You can request the PR_BODY (text) and/or PR_BODY_HTML properties in addition to or in place of the Item.Body property. 

    Tell us how this works and if it does, share the code (or XML).

    With regards, 


    Michael | Microsoft Exchange SDK

    The Exchange Development Forum Guide has useful information for using the Exchange Development Forum.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Wednesday, January 26, 2011 7:23 PM
    Moderator
  • Thank you for your tip. I tried it an it works.

    It is not alowed for me to post code, but i did it like it's described here: http://social.technet.microsoft.com/Forums/en/exchangesvrdevelopment/thread/c18dc634-cecf-47e9-aaa5-0f4e52fb41fd

    I only put that additionalproperty not in the FindItem-Request, but in the GetItem-Request.

    I also compared the performance:

    Without ExtendedProperty: 35-40 milliseconds

    With ExtendedProperty: 45-55 milliseconds

    GetItem twice: 75-85 milliseconds

     

    So with ExtendedProperty it is a little bit slower, but still mutch faster, then get the item twice.

    • Marked as answer by GambaJo Thursday, January 27, 2011 10:25 AM
    Thursday, January 27, 2011 10:24 AM
  • I am using ews-java-api and trying to request through PR_BODY 

    I am trying to get email message "plain text" with ExtendedPropertyDefinition  

    extendedPropertyDefinition = new ExtendedPropertyDefinition(0X1000,
                        MapiPropertyType.String);
    
                propertySet = new PropertySet(PropertySet.FirstClassProperties.getBasePropertySet(),
                        ItemSchema.MimeContent, extendedPropertyDefinition);
               
                propertySet.setRequestedBodyType(BodyType.HTML);
               
                emailMessage = EmailMessage.bind(service, itemId, propertySet);

    But when i try to get in ExtendedPropertyCollection it gives null.

    There is no exception but somehow Exchange Server is unable to process the request

     ExtendedPropertyCollection extendedPropCol;
    
    extendedPropCol = emailMessage.getExtendedProperties();
    Monday, March 6, 2017 2:07 PM