Hi,
Is there any way to create a .doc file which has the table and some HTML tags as the data in the table on unix platform.
I have already tried using the some of the following solutions...
PUT UNFORMATTED "<html>" SKIP.
PUT UNFORMATTED "<body>" SKIP.
PUT UNFORMATTED "<table border='1'>" SKIP.
PUT UNFORMATTED "<tr>" SKIP.
PUT UNFORMATTED "<td> Field Name</td>" SKIP.
PUT UNFORMATTED "<td> Value </td>" SKIP.
etc...
But they don;t work for when one of the colum data has following contents
<html>
<body>
<p>This is am Email template. </p>
</body>
</html>
I would apopreciate any help.
Can this be done using some API etc,
You need to differentiate between the tags that you are creating and the content. When putting content into the file you need to ensure that any html charaters are escaped. Generally this means replace:
Hi Stefan,
Thansk for your response.
I tried and if the content which I want to output to one of the column of the .doc file from a DB table field are not appearing ok on openning the .doc file.
Following is the value of the DB table field which I am trying to output :
This is a sample email temlate
<>,
<>
In the abobe example the <>, <> will be the field for merging purpose in the email template.
I would appreciate any help/idea.
Thanks.
What is your output? If you have done this correctly, it should be something like:
field name |
value |
whatever |
<html>
<body>
<p> This is a sample email temlate
<<Date>>,
<<Name>>
</html>
</body>
Hello Stefan,
Thanks for your response. This worked. I was missing the ';' while replacing the '' with '<' and '>'.
Is there any way to retain the exact formatting while outputting -
<>
<>,
This is a sample email that has been generated by the MergeIT Extensions.
If the above is the value of a DB field when output as message gives me the same formatting but when output to a column in word document all the abobe formatting is lost.
Any idea?
What data type is your field? You state that there is adobe formatting in there, how?
If you want to present adobe formatting in html then you will need to find something that translates adobe formatting to html formatting.
What are you trying to accomplish?
Field is character data type.
Trying to create a word document which has a table with 2 columns. Once of the colum cell has the value which I sent in last email This column value is coming from a DB table field. I want to populate the value in the column cell as it is, as shown in last example i.e. with lines etc in between.
How do you include adobe formatting in a character field?!?
If you want line breaks simply replace "~n" with the break tag (
) before normalizing your field value.
I have found another way, now I am not using the .doc file started using .xml instead.
Thanks for your help Stefan.