• Hi,

    I am adding 2 styles:

    MyStyle:=WPRichText1.ParStyles.AddStyle('MYPLAIN');
    MyStyle.ASetFontName(EPDataModule.DefaultFontName);
    MyStyle.ASet(WPAT_CharFontSize,EPDataModule.DefaultFontSize*100);
    MyStyleBold:=WPRichText1.ParStyles.AddStyle('MYBOLD');
    MyStyleBold.ASetFontName(EPDataModule.DefaultFontName);
    MyStyleBold.ASet(WPAT_CharFontSize,EPDataModule.DefaultFontSize*100);
    MyStyleBold.ASetAddCharStyle(WPSTY_BOLD);

    And using the as follows:

    Par:=WPRichText1.ActiveText.AppendPar;
    Par.ABaseStyle:=MyStyleBold;
    etc.

    The screen looks fine and so does a print out but when I use:

    S:=WPRichText1.AsANSIString('HTML');

    and send this as an HTML email iI lose the bold bits. The HTML is incorrect as can be seen from below:

    <html>
    <head>
    <style><!--
    MYPLAIN{font-family:'Arial';font-size:9.00pt;}
    MYBOLD{font-family:'Arial';font-size:9.00pt;font-weight:bold;}
    div{font-family:'Arial';font-size:11.00pt;}

    --></style></head><body>
    <div class="MYPLAIN" style="font-family:'Arial';font-size:11.00pt;"><font face="Arial" size="3">&nbsp;</font></div>
    <div class="MYPLAIN" style="text-align:left;">&nbsp;</div>
    <div class="MYBOLD"><font face="Arial" size="2">Ken Clarke</font></div>
    <div class="MYPLAIN"><font face="Arial" size="2">Manager</font></div>
    <div class="MYPLAIN"><font face="Arial" size="2">Tonbridge Estate Agents</font></div>
    <div class="MYPLAIN"><font face="Arial" size="2">Tonbridge</font></div>
    </body></html>

    Any help greatly appreciated.

    Ken