CSS in Outlook?

Author Message
jpjeffery

  • Total Posts : 33
  • Scores: 0
  • Reward points : 0
  • Joined: 11/17/2008
  • Status: offline
CSS in Outlook? Tuesday, July 07, 2009 2:39 AM (permalink)
0
Hi

On the off-chance that someone here is suitably knowledgable...I have a VB Script which queries various IT systems then produces and HTML report which it saves as a file on the file server and uses this also to produce an HTML format e-mail.

I've been rewriting the HTML code produced by the VB script to use CSS. This new style code is working fine when I open the .htm file, in that it's using the Verdana/Sans-serif font/font-family I've specified, but the Outlook e-mail is now displayed as Times New Roman.

I can bully it in to submission by using an old-style <font face="Verdana"> tag but that just throws out the CSS!

It shouldn't be this hard, should it?

Here's an example of the resultant code:
<HTML>
 <HEAD>
 <TITLE>IT Systems Checks Report</TITLE>
 <STYLE TYPE="text/css">
 <!--
 BODY { background-color: #FFFFFF;
        font-family: Verdana;
        font-size : 100% }
        color : #000000 }
 .OK   { font-family: Verdana,SANS-SERIF; color: #000000}
 .Warn { color: #FF6600}
 .Err  { color: #ff0000}
 -->
 </STYLE>
 <SPAN CLASS="OK"><b>IT Systems Checks report for 07/07/2009 (script v1.36 - 06/07/2009)</b><br><br>
 <hr><b><i>SUMMARY OF ISSUES FOUND:<br> (for "Script Output / Description" field on TeamWorks portal page)</i></b><br>
 PRT01\Spooler<br>
 SRV02\Spooler<br>
 <hr><b><i>FOLLOW-UP ACTIONS:<br> (for "Comments" field on TeamWorks portal page)</i></b><br>
   PRT01\Spooler:<br>
     J <br>
   SRV02\Spooler:<br>
     J<br>
 <hr><b><i>FULL REPORT:</i></b><br>
 <FONT color=#000000><i>Internet access</i><br>
   OK<br>
 <br>
 <FONT color=#000000><i>BlackLists Listing</i><br>
   Not currently listed in the BlackLists<br>
 <br>
 <FONT color=#000000><i>Print Services</i><br>
 <FONT color=#000000>  PRT01 -<SPAN CLASS="Err">   Spooler service failed to respond to query<br></SPAN>
 <FONT color=#000000>  HKPRT -<FONT color=#000000>  Hong Kong Print Spooler service online<br>
 <FONT color=#000000>  SRV02 -<SPAN CLASS="Err">   Spooler service failed to respond to query<br></SPAN>
 <br>
 <FONT color=#000000><i>Follow-up Actions for errors</i><br>
   PRT01\Spooler:<br>
     J <br>
   SRV02\Spooler:<br>
     J<br>
 <FONT color=#000000><br><br>
   *** END OF REPORT ***<br>
 (Note that code such as '<FONT color=#000000>' is due to be replaced by the appropriate <SPAN CLASS=' lines.)


So, what the heck is going on when the HTML e-mail is being produced/displayed in Times New Roman?
JJ

Variables won't. Constants aren't

Apostrophes do not belong in plurals of anything, especially not acronyms like HDD, PC, CPU and so on
 
#1
    ebgreen

    • Total Posts : 8219
    • Scores: 98
    • Reward points : 0
    • Joined: 7/12/2005
    • Status: offline
    RE: CSS in Outlook? Tuesday, July 07, 2009 3:05 AM (permalink)
    0
    To be honest, I don't think the Outlook HTML parser supports CSS.
    "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
    Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
    http://www.visualbasicscript.com/m_47117/tm.htm
     
    #2
      jpjeffery

      • Total Posts : 33
      • Scores: 0
      • Reward points : 0
      • Joined: 11/17/2008
      • Status: offline
      RE: CSS in Outlook? Tuesday, July 07, 2009 3:36 AM (permalink)
      0
      Well, there's the thing, everything I read suggested it does. To be fair, I didn't read THAT much but still, what I didn't see was en explicit statement that it doesn't.
      JJ

      Variables won't. Constants aren't

      Apostrophes do not belong in plurals of anything, especially not acronyms like HDD, PC, CPU and so on
       
      #3
        ebgreen

        • Total Posts : 8219
        • Scores: 98
        • Reward points : 0
        • Joined: 7/12/2005
        • Status: offline
        RE: CSS in Outlook? Tuesday, July 07, 2009 8:40 AM (permalink)
        0
        What did you read that suggests it does?
        "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
        Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
        http://www.visualbasicscript.com/m_47117/tm.htm
         
        #4
          ebgreen

          • Total Posts : 8219
          • Scores: 98
          • Reward points : 0
          • Joined: 7/12/2005
          • Status: offline
          RE: CSS in Outlook? Tuesday, July 07, 2009 8:48 AM (permalink)
          0
          MS has explicitly stated that Office 2007 at least only supports a subset of CSS:
           
          http://msdn.microsoft.com/en-us/library/aa338201.aspx
          "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
          Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
          http://www.visualbasicscript.com/m_47117/tm.htm
           
          #5
            jpjeffery

            • Total Posts : 33
            • Scores: 0
            • Reward points : 0
            • Joined: 11/17/2008
            • Status: offline
            RE: CSS in Outlook? Tuesday, July 07, 2009 9:09 AM (permalink)
            0
            Well, I can't remember and all the subsequent evidence suggests my speed-reading skills need improving!

            So, Inline Styles it is...dammit.
            JJ

            Variables won't. Constants aren't

            Apostrophes do not belong in plurals of anything, especially not acronyms like HDD, PC, CPU and so on
             
            #6

              Online Bookmarks Sharing: Share/Bookmark

              Jump to:

              Current active users

              There are 0 members and 1 guests.

              Icon Legend and Permission

              • New Messages
              • No New Messages
              • Hot Topic w/ New Messages
              • Hot Topic w/o New Messages
              • Locked w/ New Messages
              • Locked w/o New Messages
              • Read Message
              • Post New Thread
              • Reply to message
              • Post New Poll
              • Submit Vote
              • Post reward post
              • Delete my own posts
              • Delete my own threads
              • Rate post

              2000-2012 ASPPlayground.NET Forum Version 3.9