Microsoft Outlook Formatting

Last post 11-07-2011, 4:30 PM by syedrazi. 8 replies.
Sort Posts: Previous Next
  •  08-26-2008, 1:45 AM 43265

    Microsoft Outlook Formatting

    Hey there.  I just got this control and it's great so far.  I'm having a problem though.  I'm writing an email client, and I'm getting in emails from Outlook and I'm trying to pass the html generated from Outlook through Cute to try to get it in the right format.  Seems like cute has quite a few handy functions for this, but the ones that seem most likely don't seem to be working correctly.
     
    What I've tried to do is this...
     
    Dim CU As New CuteEditor.Editor
    CU.Text = Email.HTMLBody
    CU.CleanUpMicrosoftWordHTML()
    CU.CleanUpHTMLCode()
     
    Both of these functions don't seem to be formatting the emails the way I'm wanting them.
     
    I'm getting stuff like this:
     
    v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);}
     
    Of course MS is behind this…Obviously we need these emails to be highly professional and clean…There IS a spellcheck…right? Probably should default to auto check spelling so it is always professional :+)
     
    Anybody have any idea how to remove this formatting and convert outlook ellipses and apostrophes to their HTML counterparts?  Any help would be greatly appriciated!
  •  08-26-2008, 4:16 PM 43283 in reply to 43265

    Re: Microsoft Outlook Formatting

    MiStACoRn,
     
    Have you input the above content into editor?
     
    The above code is the outlook CSS style code. If you set the following property to true, Cute Editor should remove those code. However Cute Editor doesn't have the feature to convert outlook ellipses and apostrophes to their HTML counterparts.
     

    Editor.EnableStripStyleTagsCodeInjection Property

    Specifies whether to remove inject <Style> tags which contain malicious, client-side executable code before writing the string into the db. When this property is set to true (the default) Cute Editor strips all <Style> tags which contain malicious, client-side executable code from the html to prevent style tag injection attack.


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  11-03-2011, 4:18 PM 71000 in reply to 43283

    Re: Microsoft Outlook Formatting

    I have the same problem. Some emails are showing stuff like:
     
    p { margin: 0; }
     
    or
     
     v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);}
     
    However, setting the above property to true does not seem to resolve the issue.
     
    Any ideas? I really need to get this resolved. 
    Filed under: , ,
  •  11-04-2011, 7:26 AM 71032 in reply to 71000

    Re: Microsoft Outlook Formatting

    Hi syedrazi,
     
    Please try demo http://www.cutesoft.net/example/Online-email.aspx, do you get the same issue with this demo?
     
    If so, please show me the html content which you test on the demo. We will check it and get back to you as soon as possible.
     
    If the demo works for you. I suggest you download the latest version and try again.
     
    Latest version downloads http://www.cutesoft.net/downloads/folders/21904/download.aspx
     
    Regards,
     
    Ken
  •  11-07-2011, 11:44 AM 71197 in reply to 71032

    Re: Microsoft Outlook Formatting

    Hi Kenneth
     
    I'm still getting the problem. Here is one example of the html. I think what's going on is that the email incorrectly displays items in the <head> tag, and then it becomes part of the body in the email chain.
     
    Hopefully you can provide me a resolution on this soon.
     
    Thanks
     
    <html>
    <head>
    <base target="_blank" /><style> body {padding:0;margin:0;}</style>
    </head>
    <body >
    <html>
    <head>
    p { margin: 0; }
    </head>
    <body>
    <div style='font-family: Arial; font-size: 12pt; color: #000000'>Hi Chip....<BR>
    <BR>
    <DIV><SPAN name="x"></SPAN>
    <P style="MARGIN: auto 0in" class=ecxecxecxecxecxecxmsonormal><SPAN style="FONT-FAMILY: IRIS; COLOR: #993366; mso-bidi-font-family: Arial"><FONT size=3>Jackie<o:p></o:p></FONT></SPAN></P>
    <P style="MARGIN: auto 0in" class=ecxecxecxecxecxecxmsonormal><SPAN style="FONT-FAMILY: 'Comic Sans MS'; COLOR: #993366; FONT-SIZE: 9pt; mso-bidi-font-family: Arial">There are four things that you cannot recover in life: <o:p></o:p></SPAN></P>
    <P style="MARGIN: auto 0in" class=ecxecxecxecxecxecxmsonormal><SPAN style="FONT-FAMILY: 'Comic Sans MS'; COLOR: #993366; FONT-SIZE: 9pt; mso-bidi-font-family: Arial">&nbsp;1) The Stone............after it's thrown, <BR>
    (2) The Word.............after it's said, <BR>
    (3) The Occasion....after it's missed, and <BR>
    (4) The Time...........after it's gone<o:p></o:p></SPAN></P>
    <SPAN name="x"></SPAN><BR>
    </DIV>
    <HR id=zwchr>
    <strong>From: </strong>"Chip Diggs"<BR>
    <strong>To: </strong>"jackie"<BR>
    <strong>Sent: </strong>Monday, October 31, 2011 6:09:59 PM<BR>
    <strong>Subject: </strong>RE: Re: 2009 Lincoln MKX Purchase <BR>
    <BR>
    .MsgBody-text, .MsgBody-text * { font: 10pt monospace; }
    body {word-wrap: break-word; background-color:#ffffff;}
    body {word-wrap: break-word; background-color:#ffffff;}
    <SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">OK.&nbsp; Sounds good.<BR>
    <BR>
    <DIV><SPAN style="FONT-FAMILY: 'Segoe Script','sans-serif'; COLOR: #1f497d; FONT-SIZE: 16pt"><STRONG><EM>Chip Diggs</EM></STRONG></SPAN>
    <BR>
    </SPAN>
    <HR>
    <SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt"><strong>Sent Date:&nbsp;</strong>10/31/2011 04:50 PM<BR>
    <strong>To:&nbsp;</strong>"Chip Diggs" ;<BR>
    <strong>From:&nbsp;</strong>"jackie" <BR>
    <strong>Subject:&nbsp;</strong>RE: Re: 2009 Lincoln MKX <BR>
    <BR>
    </SPAN>
    <DIV style="FONT-FAMILY: sans-serif; FONT-SIZE: 16px">Hi Chip thanks for the info <BR>
    <BR>
    <FONT color=#333333><em><SPAN style="FONT-SIZE: 14px"><FONT face=sans-serif>Sent from my Motorola Smartphone on the Now Network from Sprint!</FONT></SPAN></em></FONT></DIV>
    <BR>
    <BR>
    -----Original message-----<BR>
    <BLOCKQUOTE style="BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px">
    <DIV style="FONT-FAMILY: sans-serif; FONT-SIZE: 14px"><strong>From: </strong>Chip Diggs <strong><BR>
    To: </strong>Jackie <strong><BR>
    Sent: </strong>Mon, Oct 31, 2011 11:49:45 EDT<strong><BR>
    Subject: </strong>RE: Re: 2009 Lincoln MKX Purchase<BR>
    <BR>
    </DIV>
    <DIV>
    p { margin: 0; }
    <DIV><FONT style="FONT-SIZE: 13px"><FONT style="FONT-SIZE: 14px"><FONT style="FONT-SIZE: 14px"><FONT style="FONT-SIZE: 14px">
    p { margin: 0; }
    </FONT></FONT></FONT></FONT><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt"><FONT style="FONT-SIZE: 14px">Jackie:&nbsp; Thanks <BR>
    </FONT><BR>
    <DIV><SPAN style="FONT-FAMILY: 'Segoe Script','sans-serif'; COLOR: #1f497d; FONT-SIZE: 16pt"><STRONG><EM>Chip Diggs</EM></STRONG></SPAN>
    </DIV>
    <BR>
    </SPAN>
    <HR>
    <SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt"><strong>Sent Date:&nbsp;</strong>10/29/2011 09:02 PM<BR>
    <strong>To:&nbsp;</strong>"Chip Diggs" ;<BR>
    <strong>From:&nbsp;</strong>"Jackie " <BR>
    <strong>Subject:&nbsp;</strong>Re: 2009 Lincoln MKX Purchase <BR>
    <BR>
    </SPAN>
    <DIV style="FONT-FAMILY: Arial; COLOR: #000000; FONT-SIZE: 12pt">Thanks Chip!!! We appreciate it!!!<BR>
    <BR>
    <DIV><SPAN></SPAN>
    <P style="MARGIN: auto 0in" class=ecxecxecxecxecxecxmsonormal><SPAN style="FONT-FAMILY: IRIS; COLOR: #993366; mso-bidi-font-family: Arial"><FONT size=3>Jackie</FONT></SPAN></P>
    <P style="MARGIN: auto 0in" class=ecxecxecxecxecxecxmsonormal><SPAN style="FONT-FAMILY: 'Comic Sans MS'; COLOR: #993366; FONT-SIZE: 9pt; mso-bidi-font-family: Arial">There are four things that you cannot recover in life: </SPAN></P>
    <P style="MARGIN: auto 0in" class=ecxecxecxecxecxecxmsonormal><SPAN style="FONT-FAMILY: 'Comic Sans MS'; COLOR: #993366; FONT-SIZE: 9pt; mso-bidi-font-family: Arial">&nbsp;1) The Stone............after it's thrown, <BR>
    (2) The Word.............after it's said, <BR>
    (3) The Occasion....after it's missed, and <BR>
    (4) The Time...........after it's gone</SPAN></P>
    <SPAN></SPAN><BR>
    </DIV>
    <HR id=zwchr>
    <strong>From: </strong>"Chip Diggs" <BR>
    <strong>To: </strong>jackie<BR>
    <strong>Sent: </strong>Saturday, October 29, 2011 8:54:10 PM<BR>
    <strong>Subject: </strong>RE: 2009 Lincoln MKX Purchase <BR>
    <BR>
    .MsgBody-text, .MsgBody-text * { font: 10pt monospace; }
    <BGSOUND CEP="0" />
    <DIV class=WordSection1>
    <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Jackie:&nbsp; No problem.&nbsp; I will check the numbers when I get back in the office on Monday and give you a call before noon.&nbsp; Have a great weekend</SPAN><SPAN style="FONT-FAMILY: Wingdings; COLOR: #1f497d; FONT-SIZE: 11pt">J</SPAN><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"></SPAN></P>
    <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">&nbsp;</SPAN></P>
    <DIV>
    <P class=MsoNormal><strong><em><SPAN style="FONT-FAMILY: 'Freestyle Script'; COLOR: #1f497d; FONT-SIZE: 26pt">Chip Diggs</SPAN></em></strong><em><SPAN style="FONT-FAMILY: 'Freestyle Script'; COLOR: #1f497d; FONT-SIZE: 26pt"></SPAN></em></P>
    <P class=MsoNormal><strong><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #c0504d; FONT-SIZE: 11pt"></SPAN></strong><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #c0504d; FONT-SIZE: 11pt"></SPAN></P>
    <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #4f81bd; FONT-SIZE: 11pt"></SPAN></P>
    <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #4f81bd; FONT-SIZE: 11pt"></SPAN></P>
    <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"></SPAN></P>
    <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"></SPAN></P>
    <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"></SPAN></P>
    <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"></SPAN></P>
    <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><A href="about:blank" target=_blank><SPAN style="COLOR: blue"></SPAN></A> - </SPAN></P>
    <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><A href="about:blank" target=_blank><SPAN style="COLOR: blue"></SPAN></A> - email</SPAN></P>
    </DIV>
    <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">&nbsp;</SPAN></P>
    <DIV>
    <DIV style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
    <P class=MsoNormal><strong><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</SPAN></strong><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"> CAR RESEARCH NOTIFICATIONS <BR>
    <strong>Sent:</strong> Saturday, October 29, 2011 8:46 PM<BR>
    <strong>To:</strong> chipdiggs<BR>
    <strong>Subject:</strong> Re: 2009 Lincoln MKX Purchase </SPAN></P>
    </DIV>
    </DIV>
    <P class=MsoNormal>&nbsp;</P>
    <DIV>
    <P style="MARGIN-BOTTOM: 12pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black">Hi Chip:&nbsp; .</SPAN></P>
    <DIV>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=ecxecxecxecxecxecxmsonormal><SPAN style="FONT-FAMILY: 'IRIS','serif'; COLOR: #993366">Jackie</SPAN></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=ecxecxecxecxecxecxmsonormal><SPAN style="FONT-FAMILY: 'Comic Sans MS'; COLOR: #993366; FONT-SIZE: 9pt">There are four things that you cannot recover in life: </SPAN></P>
    <P style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=ecxecxecxecxecxecxmsonormal><SPAN style="FONT-FAMILY: 'Comic Sans MS'; COLOR: #993366; FONT-SIZE: 9pt">&nbsp;1) The Stone............after it's thrown, <BR>
    (2) The Word.............after it's said, <BR>
    (3) The Occasion....after it's missed, and <BR>
    (4) The Time...........after it's gone</SPAN></P>
    <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black">&nbsp;</SPAN></P>
    </DIV>
    <DIV style="TEXT-ALIGN: center" class=MsoNormal align=center><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black">
    <HR id=zwchr align=center SIZE=2 width="100%">
    </SPAN></DIV>
    <P style="MARGIN-BOTTOM: 12pt" class=MsoNormal><strong><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black">From: </SPAN></strong><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black">"Chip Diggs" <BR>
    <strong>To: </strong>Jackie</SPAN></P>
    </DIV>
    </DIV>
    </DIV>
    </DIV>
    </DIV>
    </BLOCKQUOTE> </div>
    </body>
    </html>
    </body>
    </html>
  •  11-07-2011, 12:14 PM 71199 in reply to 71197

    Re: Microsoft Outlook Formatting

    Hi syedrazi,
     
    Please set property EditCompleteDocument to true and try again.
     
     <CE:Editor ID="editor1" runat="server" EditCompleteDocument="true">
            </CE:Editor> 
     
    Regards,
     
    Ken
  •  11-07-2011, 2:09 PM 71200 in reply to 71199

    Re: Microsoft Outlook Formatting

    Unfortunately that did not work. I still get the same problem. Here is another example of a html email. 
     
     
    <head><style></style></head><body><STYLE type=text/css>
            H1 {text-align:center; font-size:20px; font-family:Verdana,Helvetica, sans-serif; color:#000000; } td { font-family:Verdana, Helvetica, sans-serif; font-size:13px; } .text { font-size:14px; font-family:Verdana,Helvetica, sans-serif; color:#333333; line-height:17px; } .signature { font-size:13px; line-height:15px; color:#333333; } .endtext { font-size:10px; color:#ffffff; font-family:Verdana, Helvetica, sans-serif; background:#333333; } .price { align:center; width:203px; font-size:32px; font-weight:bold; color:Red; font-family:Verdana, Helvetica, sans-serif; background:#FFFFFF; text-align:center; } .small { width:202px; font-size:9px; color:#000000; font-family:Verdana, Helvetica, sans-serif; background:#FFFFFF; } ul { font-family:Verdana, Helvetica, sans-serif; font-size:13px; } .medium { font-size:10px; color:#000000; font-family:Verdana, Helvetica, sans-serif; background:#FFFFFF; } .large { font-size:24px; text-align:center; text-weight:bold; color:#000000; font-family:Verdana, Helvetica, sans-serif; background:#FFFFFF; }
        </STYLE>
     This is a test
    </body> 
     
    If the email is in this format, it doesn't display correctly.
     
    Just FYI, we were previously using Telerik's RadEditor, but switched from it to CuteEditor and purchased the CuteEditor license b/c RadEdtior was having some other issues. If I pull up these emails using Telerik's RadEditor, they all display correctly and just fine. 
     
     
  •  11-07-2011, 3:37 PM 71202 in reply to 71200

    Re: Microsoft Outlook Formatting

    Hi syedrazi,
     
    By default editor will remove the <style> target. Please set  EnableStripStyleTagsCodeInjection="false", it should fix the problem of the html content above.
     
     <CE:Editor ID="editor1" runat="server" EnableStripStyleTagsCodeInjection="false"
                EditCompleteDocument="true">
            </CE:Editor> 
     
    Regards,
     
    Ken
  •  11-07-2011, 4:30 PM 71204 in reply to 71202

    Re: Microsoft Outlook Formatting

    That worked! Thanks
View as RSS news feed in XML