none
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:

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

    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="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
    <head>
    <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>
    <o:OfficeDocumentSettings>
    <o:AllowPNG/>
    </o:OfficeDocumentSettings>
    </xml><![endif]--><!--[if gte mso 9]><xml>
    <w:WordDocument>
    <w:TrackMoves/>
    <w:TrackFormatting/>
    <w:HyphenationZone>21</w:HyphenationZone>
    <w:EnvelopeVis/>
    <w:PunctuationKerning/>
    <w:ValidateAgainstSchemas/>
    <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
    <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
    <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
    <w:DoNotPromoteQF/>
    <w:LidThemeOther>NL</w:LidThemeOther>
    <w:LidThemeAsian>X-NONE</w:LidThemeAsian>
    <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
    <w:Compatibility>
    <w:BreakWrappedTables/>
    <w:SnapToGridInCell/>
    <w:WrapTextWithPunct/>
    <w:UseAsianBreakRules/>
    <w:DontGrowAutofit/>
    <w:SplitPgBreakAndParaMark/>
    <w:EnableOpenTypeKerning/>
    <w:DontFlipMirrorIndents/>
    <w:OverrideTableStyleHps/>
    </w:Compatibility>
    <m:mathPr>
    <m:mathFont m:val="Cambria Math"/>
    <m:brkBin m:val="before"/>
    <m:brkBinSub m:val="&#45;-"/>
    <m:smallFrac m:val="off"/>
    <m:dispDef/>
    <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"/>
    </m:mathPr></w:WordDocument>
    </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-face
    	{font-family:"Cambria Math";
    	panose-1:2 4 5 3 5 4 6 3 2 4;
    	
    	
    	
    	}
    @font-face
    	{font-family:Calibri;
    	panose-1:2 15 5 2 2 2 4 3 2 4;
    	
    	
    	
    	}
    /* Style Definitions */
    p.MsoNormal, li.MsoNormal, div.MsoNormal
    	{
    	
    	"";
    	margin:0cm;
    	margin-bottom:.0001pt;
    	
    	font-size:11.0pt;
    	font-family:"Calibri",sans-serif;
    	
    	
    	
    	"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" />
    </o:shapelayout></xml><![endif]-->
    </head>
    <body lang="NL" link="#0563C1" vlink="#954F72" style="tab-interval:35.4pt">
    <div>
    <p><span lang="EN-US" >Str string<o:p></o:p></span></p>
    </div>
    </body>
    </html>

     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