Problem with SaveTextFormat as HTML

  • I'm trying to send individual mailmerge records as emails after each is merged within the merge process. I'm saving the wprichtext in html format and using that for main body of message. Problem is that it only works for the first message, all subsequent messages seem to have invalid unrenderable html.

    The difference with first message seems to be that the wprichtext where text is merged to has two carriage returns in it at beginning. When first email is created the html is okay, but the wprichtext merge destination is cleared after that first time and subsequent html saves have some different formatting that screws things up.

    I'd appreciate any tips on what might be going wrong. I am using the WPXMLFile to render the html, at least I think I am.

    Regards,

    Herbert Sitz


    Here's illustration of the first html record saved and the second.
    -------------------------------------------------------
    This is from first record, which renders okay:

    <html><head><meta name=3D"Generator" content=3D"WPTools V4.0 HTML/CSS Ex=
    port"/>
    <style type=3D"text/css"><!--
    Default{display:block;font-size:11pt;}
    LI{display:list-item;margin:0.00in;}
    p{display:block;margin:0.00in;}
    --></style>
    </head><BODY style=3D"margin:0px;padding:0px;"><p class=3D"Default">8/6/=
    2004</p>
    <p>&nbsp;</p>
    <p><SPAN style=3D"font-size:11pt;">Bass</SPAN></p>
    <p><SPAN style=3D"font-size:11pt;">Deirdre</SPAN></p>
    <p><SPAN style=3D"font-size:11pt;">Friend&lt;-------&gt;Friend</SPAN></p=
    >
    ---------------------------------------

    This is from second (and subsequent records are similar) and it has problems, results in blank page in Outlook Express, or garbled page when I click on 'Reply" to generate a response email:

    <html><head><meta name=3D"Generator" content=3D"WPTools V4.0 HTML/CSS Ex=
    port"/>
    <style type=3D"text/css"><!--
    Default{display:block;font-size:11pt;}
    LI{display:list-item;margin:0.00in;}
    p{display:block;margin:0.00in;}
    body{font-weight:normal;font-style:normal;font-family:"Arial";font-size:=
    10pt;color:black;background-color:black;margin:0.00in;text-indent:0.00in=
    ;line-height:0.00in;text-align:left;background-color:white;list-style:no=
    ne;}
    --></style>
    </head><BODY style=3D"margin:0px;padding:0px;"><p class=3D"Default">8/5/=
    2004</p>
    <p>&nbsp;</p>
    <p><SPAN style=3D"font-size:11pt;">Bass</SPAN></p>
    <p><SPAN style=3D"font-size:11pt;">Deirdre</SPAN></p>
    <p><SPAN style=3D"font-size:11pt;">Friend&lt;-------&gt;Friend</SPAN></p=
    >
    --------------------------------------
    The only difference I can find is the inclusion of this block in the second and subsequent records, which doesn't occur within the first:

    body{font-weight:normal;font-style:normal;font-family:"Arial";font-size:=
    10pt;color:black;background-color:black;margin:0.00in;text-indent:0.00in=
    ;line-height:0.00in;text-align:left;background-color:white;list-style:no=
    ne;}
    ----------------------------------

  • Julian -- Interesting point. Yes, the '3D' really is in there. I'm getting this htm directly from the email message in Outlook Express. It seems the 3D is inserted by OE; it's definitely not there when I get it from WPRichText to put into the email message.

    See http://www.siteexperts.com/forums/viewconverse.asp?d_id=10233 .

    But the '3D' is not the problem, since IE and apparently other browsers are generally unaffected by it. I'm looking through at all sorts of html emails in my mailbox, and all have those '3D' characters in the text and all render fine.

    I still think the problem is that extra group of characters, like I said in the original message, the first one renders fine but the subsequent ones that have those extra characters do not.

    -- Herb

  • A little more information:

    I'm using WPReporter and the SuperMerge component. Merge template is in WPRichText1 and the text for each email is merged to a second control WPRichDest, and then html text of WPRichText is put into an email and sent. Then WPRichDest is cleared (I've tried both WPRichDest.Clear and WPRichDest.Fastclear). Then loop goes back again for each email.

    It seems there's something about the 'Clear' or 'Fastclear' operation that's causing that block of html code to appear in second and subsequent messages. WPRichDest is not explicitly cleared before I send first message (only after), and the first message does not include that block and it renders fine. When I clear WPRichDest explicitly before I send the first message, then I get that code in the first message and it, too, fails to render.

  • "please check out the WPXMLFile unit,

    the body style is created in the line #254
    FStyleCollection.XMLStyle(wp_xml_body) "

    Julian -- I'm trying to view (in IE) an html file created directly by WPRichText that doesn't have the '3D' characters. Without the body style it renders fine. With the body style that WPRichTools creates it doesn't render, I get a blank page.

    Just want to confirm that this is some problem with the code generated in or related to the body style, and not with anything I'm doing.

    I really don't know what I'm supposed to do at this point. Any suggestions? (Other than removing style collection, which I assume means I lose ability to use styles at all?)

    Thanks,

    Herb

  • Julian -- No problem, I can easily make change to the WPTools source. But what I'm wondering is whether there's something screwy in my setup or the way I'm doing things, or whether there's something wrong in WPTools.

    If I make a change to the WPTools source am I going to have to make sure it gets made in each minor update I install? Or is this a bug in WPTools that's going to be fixed in upcoming versions?

    Thanks for your help,

    Herb

  • Julian -- Great, thanks again.

    Yes, not really a bug in WPTools code or even in the html it generates, more like bug in IE if it doesn't recognize valid html.

    Just wanted to make sure I understood things right.

    Cheers,

    Herb