manipulating word template

Apr 29 2009 1:12 PM

Hi,

I have a word template as below:

[OpeningTagStart]

This line will repeat with [Values]

[/OpeningTagStart]

I get data from a database and replace in the template the "values". The "line" is contrstructed and pasted into the document, however apart from the first line the formatting of the lines go missing the second line onwards.

How can I retain the formatting ?

A code block/snippet to achive this would be helpful.