Many thanks

The <BR> on the end of each line works fine

Bob

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Larry Hiscock
Sent: 04 July 2005 17:47
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] spool images going to word documents


It's not a cr/lf problem, per se - HTML/XML ignores CRs and LFs.  You have a
couple of choices:

1) Convert all of the LF (or CR/LF) characters in DATAREC to <BR>, which
will force a break between each line

2) Wrap DATAREC in a CDATA tag, which will tell the XML parser that it is
data and not to parse it as if it were HTML/XML.

The syntax for #2 would look like this:

--snip--

      REC<-1> = '<body>'
      REC<-1> = '<![CDATA['
        REC := @FM:DATAREC - where DATAREC is the record from the spoolq
      REC<-1> = ']]>'
      REC<-1> = '</body>'

--snip-- 

This will also avoid having to escape any other illegal XML characters (eg
<, >, &, ', ", etc).  

Larry Hiscock
Western Computer Services


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bob Witney
Sent: Monday, July 04, 2005 6:20 AM
To: U2-Users (E-mail)
Subject: [U2] spool images going to word documents

I am building an email as follows to send a report as a word attachment via
sendmail from aix 5.2 (Universe 10)

            REC<-1> = '<html
xmlns:o="urn:schemas-microsoft-com:office:office"'
            REC<-1> = 'xmlns:w="urn:schemas-microsoft-com:office:word"'
            REC<-1> = 'xmlns="http://www.w3.org/TR/REC-html40";>'
            REC<-1> = '<head>'
            REC<-1> = '<meta http-equiv=Content-Type content="text/html;
charset=windows-1252">'
            REC<-1> = '<meta name=ProgId content=Word.Document>'
            REC<-1> = '<meta name=Generator content="Microsoft Word 9">'
            REC<-1> = '<meta name=Originator content="Microsoft Word 9">'
            REC<-1> = '<!--[if gte mso 9]><xml>'
            REC<-1> = ' <o:DocumentProperties>'
            REC<-1> = '  <o:Category>TLOG</o:Category>'
            REC<-1> = ' </o:DocumentProperties>'
            REC<-1> = '</xml>'
            REC<-1> = '</head>'
            REC<-1> = '<body>'
        REC := @FM:DATAREC - where DATAREC is the record from the spoolq
        REC<-1> = '</body>'
        REC<-1> = '</html>'

It arrives as a word attatchment, the only problem is that when i open it
with Word i have one lone string of characters and have lost all the line
breaks

I suspect that I need to pass a line feed of some sort into word but the
usual char(10) and char(13) do not do the trick

Has anyone seen this before and found a fix ?

Many thanks

Bob 


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to