Outlook don't understand his own HTML-Body in Calendar- and TaskItems RRS feed

  • Question

  • I am realy desperate. This thing makes me crazy.

    I try to make a sync (with EWS) between Exchenge and an other application (in both directions), and i have a big problem.


    I realized, that Outlook must use different editors for the body of eMails and Appointemnts/Tasks. When you receive the bodys with formated text of this items, you know, what i mean.


    Outlooks eMails unterstenad something like this: "<span style="FONT-SIZE: 22px; COLOR: red; FONT-FAMILY: Algerian; BACKGROUND-COLOR: yelow">Formated TestText</span>


    Outlooks tasks and appointments don't unterstand this, and ignores the formating.


    When i generate the same formated text, in appointments and tasks it looks something like that:

    <font face="Algerian, fantasy" size="6">

    <div><font color="#FF0000"><span style="background-color:#FFFF00">Formated TestText</span></font></div>


    So i tried to write a converter, witch can convert the code, because i can't find an HTML-Editor-Control, witch can generate HTML-code, witch can be read by outlooks appointments ans tasks.


    I spend the whole day, and wonder, why i can't cange the background-color.

    So i made a little test.

    I made a appointment in outlook manualy. In this appointment i wrote the text "Formated Text" in the Body, and change the background-color of this text to the color yellow. Then i made a little test-application, witch receive this appointment via EWS. When the appointment received, the application makes a new appointment, and copy the body of the received appointemnet to the new appointemnt. Then the application creates this new appointment on exchange.

    And when you open outlook an there the new appointment, the background-color is gone.

    The code:



    <meta http-equiv=Content-Type" content="text/html"; charset=utf-8">

    <meta name="Generator" content="Microsoft Exchange Server">

    <!-- converted from rtf -->

    <style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>



    <font face ="Calibri, sans-serif" size="2">

    <div><span style=background-color:FFFF00">Formated Text</span></div>






    So why Outlook don't understeand his own html-code?


    (I use outlook 2007 and Exchange 2007)

    Friday, February 25, 2011 3:37 PM

All replies

  • A microsoft moderator in an other forum told me, that outlook saves the bodys in rtf.

    I can imagine that, because in the bodys there is the comment "coverted from rtf".


    But EWS delivers only plain-text or html-text. I can't receive the rtf-text.


    So if this is true, i have two questions:


    1. Why exchange converts mails different, than appointments/task (because mails works fine)?

    2. Witch html-code i have to send to exchange to set the size, the style/typeface or the color (and background-color) of a font in appointments and tasks?


    I realy supprized about that. I can't imagine, that i'm the frist one, who find this out. Is there nobody, who sends appointments or tasks with formated bodys to exchange with EWS?

    I mean, we have now the second version of exchange, witch supports EWS.


    The result of my problem is, that i can make appointments/tasks only with plaint-text. Otherwise the formating can be damaged.

    Monday, February 28, 2011 7:35 AM
  • Ok, i tried some stuff, and find out, what's wrong.

    My html-Control generates code like this:


    <span style=“FONT-SIZE: 26px; COLOR: red; FONT-FAMILY: Algerian; BACKGROUND-COLOR: yellow”><strong><em><u>Testtext</u></em></strong></span>


    But exchange can only deal with this:


    <B><I><U><FONT COLOR=“#FF0000“ SIZE=7 FACE=”Algerian”>Testtext</FONT></U></I></B>


    So the problem is the font-tag, witch doesn't have an attribute for background-color. So this attribute will be ignored.

    So there is no way to set the background-color of a part of a text over EWS. 

    Monday, February 28, 2011 8:59 AM