none
Outlook 2010 doesn't render <textarea> tags in HTML emails received

    Question

  • Hi,

    My application sends HTML emails and within those emails, it includes a variable amount of ‘free text’ in a suitably sized & scrollable text-area. These emails display just fine in Outlook 2003, because it uses the Internet Explorer engine to render HTML emails.

    In case you are wondering, the need to contain the free text in a textarea is because the text is plain text, so usually has a number of paragraphs/lines breaks, etc. which is useful to keep for readability. Additionally, there is often quite a lot of text too, so it’s useful to keep it contained with a reasonably small textarea, so the bottom of the email body is visible.

    The company I work for is just upgrading everyone to Outlook 2010 (which I realise uses Word 2010 to render HTML emails), but the textarea tag doesn't seem to get rendered at all (it seems to treat it like a non-scrollable DIV tag), so you get a mess of the content that should be contained by the text area, just flowing into the rest of the email body and treated as HTML. So, any multiple line breaks in the free text are ignored and treated as a single space.

    I’ve tried replacing the textarea with a scrollable <DIV> but it doesn’t scroll in the received email, it just expands to fit the amount of text, and of course you still lose the formatting of the plain text. I suppose I could try replacing each line break with a </br> tag and each space character with &nbsp; but I’m hoping there is an easier solution.

    According to http://msdn.microsoft.com/en-us/library/aa338201.aspx the Word HTML that Outlook 2007 & 2010 uses to render HTML emails, is supposed to support the <textarea> tag (just not the “cols” attribute), but that doesn’t seem to be the case.

    Please can anyhow tell me how I can get Outlook 2010 to render the textarea content correctly ?

    Thanks a lot, Iain.

    P.S. I’ve included an example of an email here:

    <html><head><style type="text/css">#ForceOutlook2010BrowserLink span { padding: 0px; }</style></head><body>
    Dear Iain,
    <br /><br />
    Event Ref: <b>583091</b>
    <br />
    Issue Description: REACTIVE CSI - VIEW SURVEY
    <br />
    Date Logged: 16 Nov 2010 11:26
    <br />
    Status: In Progress
    <br /><br />
    Further information is available:
    <textarea name="txtNotes" rows="13" cols="140">Iain

    Thanks for this, I'm not surprised it's taken this long to notice;
    people only tend to try and view these when it comes round to reporting
    time!

    I'm not sure whether this is related but Jeff logged a job yesterday
    regarding performance issues when looking at CSI results through AFM
    accounts.  Just thought it was worth mentioning.

    Regards

    Jane

    -----Original Message-----

    Hi Jane,

    Sorry for not getting back to you sooner. This issue seems to have been
    introduced when I fixed the bug back on 6 Oct for Jeff concerning the
    wrong CSI data being returned after adopting different AFM accounts -
    see event 557127

    It's taken nearly 6 weeks for someone to spot and report it! Therefore,
    hopefully its not mega urgent, but I am working on a fix and would hope
    to be able to release it in the next day or so.

    I'll keep you informed.

    Iain</textarea>
    <br /><br />
    Regards,
    <br />
    The IT Support Helpdesk.
    <br />
    </body></html>

    Friday, November 19, 2010 4:21 PM

Answers

  • Someone else may have a better answer, but I'm not a real HTML coder, I hack it. So what I'd do is format things the way you'd want them in a Word doc and then use similar HTML for the Outlook HTML. I've been able to get a lot of HTML working that way.

    --
    Ken Slovak
    [MVP - Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007.
    Reminder Manager, Extended Reminders, Attachment Options.
    http://www.slovaktech.com/products.htm
     
     
    "Iain Johnson" <=?utf-8?B?SWFpbiBKb2huc29u?=> wrote in message news:aaf758ab-8de8-4f25-ac40-dc880fe4ef34...

    Hi,

    My application sends HTML emails and within those emails, it includes a variable amount of ‘free text’ in a suitably sized & scrollable text-area. These emails display just fine in Outlook 2003, because it uses the Internet Explorer engine to render HTML emails.

    In case you are wondering, the need to contain the free text in a textarea is because the text is plain text, so usually has a number of paragraphs/lines breaks, etc. which is useful to keep for readability. Additionally, there is often quite a lot of text too, so it’s useful to keep it contained with a reasonably small textarea, so the bottom of the email body is visible.

    The company I work for is just upgrading everyone to Outlook 2010 (which I realise uses Word 2010 to render HTML emails), but the textarea tag doesn't seem to get rendered at all (it seems to treat it like a non-scrollable DIV tag), so you get a mess of the content that should be contained by the text area, just flowing into the rest of the email body and treated as HTML. So, any multiple line breaks in the free text are ignored and treated as a single space.

    I’ve tried replacing the textarea with a scrollable <DIV> but it doesn’t scroll in the received email, it just expands to fit the amount of text, and of course you still lose the formatting of the plain text. I suppose I could try replacing each line break with a </br> tag and each space character with &nbsp; but I’m hoping there is an easier solution.

    According to http://msdn.microsoft.com/en-us/library/aa338201.aspx the Word HTML that Outlook 2007 & 2010 uses to render HTML emails, is supposed to support the <textarea> tag (just not the “cols” attribute), but that doesn’t seem to be the case.

    Please can anyhow tell me how I can get Outlook 2010 to render the textarea content correctly ?

    Thanks a lot, Iain.

    P.S. I’ve included an example of an email here:

    <html><head><style type="text/css">#ForceOutlook2010BrowserLink span { padding: 0px; }</style></head><body>
    Dear Iain,
    <br /><br />
    Event Ref: <b>583091</b>
    <br />
    Issue Description: REACTIVE CSI - VIEW SURVEY
    <br />
    Date Logged: 16 Nov 2010 11:26
    <br />
    Status: In Progress
    <br /><br />
    Further information is available:
    <textarea name="txtNotes" rows="13" cols="140">Iain

    Thanks for this, I'm not surprised it's taken this long to notice;
    people only tend to try and view these when it comes round to reporting
    time!

    I'm not sure whether this is related but Jeff logged a job yesterday
    regarding performance issues when looking at CSI results through AFM
    accounts.  Just thought it was worth mentioning.

    Regards

    Jane

    -----Original Message-----

    Hi Jane,

    Sorry for not getting back to you sooner. This issue seems to have been
    introduced when I fixed the bug back on 6 Oct for Jeff concerning the
    wrong CSI data being returned after adopting different AFM accounts -
    see event 557127

    It's taken nearly 6 weeks for someone to spot and report it! Therefore,
    hopefully its not mega urgent, but I am working on a fix and would hope
    to be able to release it in the next day or so.

    I'll keep you informed.

    Iain</textarea>
    <br /><br />
    Regards,
    <br />
    The IT Support Helpdesk.
    <br />
    </body></html>


    Ken Slovak MVP - Outlook
    • Proposed as answer by Bessie Zhao Friday, November 26, 2010 5:04 PM
    • Marked as answer by Bessie Zhao Monday, November 29, 2010 9:13 AM
    Friday, November 19, 2010 9:28 PM

All replies

  • Someone else may have a better answer, but I'm not a real HTML coder, I hack it. So what I'd do is format things the way you'd want them in a Word doc and then use similar HTML for the Outlook HTML. I've been able to get a lot of HTML working that way.

    --
    Ken Slovak
    [MVP - Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007.
    Reminder Manager, Extended Reminders, Attachment Options.
    http://www.slovaktech.com/products.htm
     
     
    "Iain Johnson" <=?utf-8?B?SWFpbiBKb2huc29u?=> wrote in message news:aaf758ab-8de8-4f25-ac40-dc880fe4ef34...

    Hi,

    My application sends HTML emails and within those emails, it includes a variable amount of ‘free text’ in a suitably sized & scrollable text-area. These emails display just fine in Outlook 2003, because it uses the Internet Explorer engine to render HTML emails.

    In case you are wondering, the need to contain the free text in a textarea is because the text is plain text, so usually has a number of paragraphs/lines breaks, etc. which is useful to keep for readability. Additionally, there is often quite a lot of text too, so it’s useful to keep it contained with a reasonably small textarea, so the bottom of the email body is visible.

    The company I work for is just upgrading everyone to Outlook 2010 (which I realise uses Word 2010 to render HTML emails), but the textarea tag doesn't seem to get rendered at all (it seems to treat it like a non-scrollable DIV tag), so you get a mess of the content that should be contained by the text area, just flowing into the rest of the email body and treated as HTML. So, any multiple line breaks in the free text are ignored and treated as a single space.

    I’ve tried replacing the textarea with a scrollable <DIV> but it doesn’t scroll in the received email, it just expands to fit the amount of text, and of course you still lose the formatting of the plain text. I suppose I could try replacing each line break with a </br> tag and each space character with &nbsp; but I’m hoping there is an easier solution.

    According to http://msdn.microsoft.com/en-us/library/aa338201.aspx the Word HTML that Outlook 2007 & 2010 uses to render HTML emails, is supposed to support the <textarea> tag (just not the “cols” attribute), but that doesn’t seem to be the case.

    Please can anyhow tell me how I can get Outlook 2010 to render the textarea content correctly ?

    Thanks a lot, Iain.

    P.S. I’ve included an example of an email here:

    <html><head><style type="text/css">#ForceOutlook2010BrowserLink span { padding: 0px; }</style></head><body>
    Dear Iain,
    <br /><br />
    Event Ref: <b>583091</b>
    <br />
    Issue Description: REACTIVE CSI - VIEW SURVEY
    <br />
    Date Logged: 16 Nov 2010 11:26
    <br />
    Status: In Progress
    <br /><br />
    Further information is available:
    <textarea name="txtNotes" rows="13" cols="140">Iain

    Thanks for this, I'm not surprised it's taken this long to notice;
    people only tend to try and view these when it comes round to reporting
    time!

    I'm not sure whether this is related but Jeff logged a job yesterday
    regarding performance issues when looking at CSI results through AFM
    accounts.  Just thought it was worth mentioning.

    Regards

    Jane

    -----Original Message-----

    Hi Jane,

    Sorry for not getting back to you sooner. This issue seems to have been
    introduced when I fixed the bug back on 6 Oct for Jeff concerning the
    wrong CSI data being returned after adopting different AFM accounts -
    see event 557127

    It's taken nearly 6 weeks for someone to spot and report it! Therefore,
    hopefully its not mega urgent, but I am working on a fix and would hope
    to be able to release it in the next day or so.

    I'll keep you informed.

    Iain</textarea>
    <br /><br />
    Regards,
    <br />
    The IT Support Helpdesk.
    <br />
    </body></html>


    Ken Slovak MVP - Outlook
    • Proposed as answer by Bessie Zhao Friday, November 26, 2010 5:04 PM
    • Marked as answer by Bessie Zhao Monday, November 29, 2010 9:13 AM
    Friday, November 19, 2010 9:28 PM
  • Hi Ken,

    Thanks - it's a good idea, however, I've tried it, i.e. got a textarea to "show" in a Word document (opened from a html file), then saved and used the HTML generated by Word, as my email "body". The Word HTML had a lot ofextra styling, etc. in it, so I thought it might just work, but it didn't. Exactly the same thing. So annoying.

    Please does anyone have any further suggestions ?

    Thanks, Iain.

    Monday, November 22, 2010 9:52 AM
  • How I can get Outlook 2010 to render the textarea content correctly ?

    Tuesday, February 22, 2011 3:19 AM
  • @userneed - I posted this same question on the Word forum and was told it just wasn't possible for Word to show a textarea. Therefore, I came up with a workaround that...er, works for me, where I use some conditional tags, like:

    <!--[if mso]>

    <DIV>...

    <![endif]-->

    <!--[if !mso]>

    <textarea>....

     

     

    to either show the text in a DIV (when not being viewed in Microsoft Office (mso)) or in a textarea when using MS Office - see here http://social.msdn.microsoft.com/Forums/eu/worddev/thread/244bd2f5-5169-477c-b866-840f276ce5ff

    Tuesday, February 22, 2011 9:32 AM