How to prevent: Programmatically created ICS files become HTML-formatted in Outlook 2007
I have an ASP.NET application that creates and downloads 开发者_C百科ICS files to the user. It's working fine. With StackOverflow's help, I got past a number of ICS+Outlook hurdles, so thanks.
But Outlook 2007 is HTML-formatting my plain-text ICS content. So I will put in something like this:
Training date/time:
- GMT: [dateAndTime]
- Local: [dateAndTime]
(I don't know why StackOverflow is making "Training" and "Local" blue above - please ignore that.)
...but when I open the ICS in Outlook, it looks like this:
Training date/time:
- GMT: [dateAndTime]
- Local: [dateAndTime]
Because some of our users have non-HTML-enabled calendar/email tools, I have to use to plain-text content. When Outlook formats everything for me, I have much less control over the look. (And the rules it follows are unclear. e.g., adding one blank space at the end of a line makes it a heading?)
How do I prevent this from happening? Or at least, is there some kind of Outlook ICS style guide so I can use this "feature" intentionally?
Have you tried using X-ALT-DESC?
X-ALT-DESC;FMTTYPE=text/html:<div>Training date/time</div><ul>
<li>GMT: [dateAndTime]</li><li>Local: [dateAndTime]</li></ul>
That way you can have a normal "text" description in DESCRIPTION
and provide an alternate, html-formatted description in X-ALT-DESC
.
-Doug
精彩评论