When an appointment is synced to a third party application from outlook application the appointment body contains the html content as well as the some of the style content. RRS feed

  • Question

  • Hi, 

    I am trying to access an appointment that was created in outlook application with the help of EWS services and the Body attribute of the appointment property has a value which contains html content as well as styles and other formatting. But when I access an appointment created in outlook web, only the html content is returned. I tried to convert the resulting content returned from the outlook application from html to text but then too, certain unwanted strings remain. I will attach both the contents below for your reference. Please suggest a way to return only the html content when an appointment is accessed from outlook application.

    The value of Body attribute from outlook web is as follows:

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <style type="text/css" style="display:none"><!-- p { margin- margin-bottom: 0px; }--></style>
    <body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">

    While the content returned from the outlook application is very large even when the appointment details only contain a subject and a one lined body. The content returned is in the following way:

    <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="" xmlns="">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="ProgId" content="Word.Document">
    <meta name="Generator" content="Microsoft Word 15">
    <meta name="Originator" content="Microsoft Word 15">
    <link rel="File-List" href="cid:filelist.xml@01D4EA56.ABB6D4C0"><!--[if gte mso 9]><xml>
    </xml><![endif]--><!--[if gte mso 9]><xml>
    <m:mathFont m:val="Cambria Math"/>
    <m:brkBin m:val="before"/>
    <m:brkBinSub m:val="&#45;-"/>
    <m:smallFrac m:val="off"/>
    <m:lMargin m:val="0"/>
    <m:rMargin m:val="0"/>
    <m:defJc m:val="centerGroup"/>
    <m:wrapIndent m:val="1440"/>
    <m:intLim m:val="subSup"/>
    <m:naryLim m:val="undOvr"/>
    </xml><![endif]--><!--[if gte mso 9]><xml>
    <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="false" DefSemiHidden="false" DefQFormat="false" DefPriority="99" LatentStyleCount="371">
    <w:LsdException Locked="false" Priority="0" QFormat="true" Name="Normal"/>
    /* Font Definitions */
    	{font-family:"Cambria Math";
    	panose-1:2 4 5 3 5 4 6 3 2 4;
    	panose-1:2 15 5 2 2 2 4 3 2 4;
    /* Style Definitions */
    p.MsoNormal, li.MsoNormal, div.MsoNormal
    	"Times New Roman";
    </style><![endif]--><!--[if gte mso 9]><xml>
    <o:shapedefaults v:ext="edit" spidmax="1026" />
    </xml><![endif]--><!--[if gte mso 9]><xml>
    <o:shapelayout v:ext="edit">
    <o:idmap v:ext="edit" data="1" />
    <body lang="NL" link="#0563C1" vlink="#954F72" style="tab-interval:35.4pt">
    <p><span lang="EN-US" >Str string<o:p></o:p></span></p>

     Please help to retrieve the html content only when an appointment is synced from outlook app as well.

    Thanks in advance.


    Tuesday, April 16, 2019 7:51 AM